mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
if needle is empty free allocated memory
This commit is contained in:
parent
ca67d27fb2
commit
457f22c198
@ -1352,6 +1352,9 @@ PHP_FUNCTION(stristr)
|
||||
if (Z_TYPE_PP(needle) == IS_STRING) {
|
||||
if (!Z_STRLEN_PP(needle)) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty delimiter.");
|
||||
efree(haystack_orig);
|
||||
zval_ptr_dtor(haystack);
|
||||
zval_ptr_dtor(needle);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user