Fix bug #72221 (segfault, past-the-end access)

This commit is contained in:
Lauri Kenttä 2016-05-21 18:46:00 +03:00
parent 4f077aee83
commit 26fa27d760

View File

@ -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])];
}