mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Fix bug #72221 (segfault, past-the-end access)
This commit is contained in:
parent
4f077aee83
commit
26fa27d760
@ -2965,6 +2965,9 @@ ZEND_API const char* ZEND_FASTCALL zend_memnstr_ex(const char *haystack, const c
|
||||
if (i == needle_len) {
|
||||
return p;
|
||||
}
|
||||
if (UNEXPECTED(p == end)) {
|
||||
return NULL;
|
||||
}
|
||||
p += td[(unsigned char)(p[needle_len])];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user