mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Fix GH-12999: zend_strnlen build fix when platform misses strnlen support.
fix from @rainerjung
This commit is contained in:
parent
3c176d4189
commit
a2068ef47b
1
NEWS
1
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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user