diff options
-rw-r--r-- | Zend/zend_operators.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index 50557e56d8..a02551b1bd 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2927,6 +2927,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])]; } |