diff --git a/NEWS b/NEWS index 61114e8226a..869fa29a9b5 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ PHP NEWS - Core: . Fixed bug GH-12953 (false positive SSA integrity verification failed when loading composer classmaps with more than 11k elements). (nielsdos) + . Fixed bug GH-12999 (zend_strnlen build when strnlen is unsupported). (rainerjung) - Cli: . Fix incorrect timeout in built-in web server when using router script and diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 20eb7245afc..4f4a14b9305 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -269,7 +269,7 @@ static zend_always_inline size_t zend_strnlen(const char* s, size_t maxlen) #if defined(HAVE_STRNLEN) return strnlen(s, maxlen); #else - const char *p = memchr(s, '\0', maxlen); + const char *p = (const char *)memchr(s, '\0', maxlen); return p ? p-s : maxlen; #endif }