]> granicus.if.org Git - php/commitdiff
- MFH: Fixed memory corruption in stristr().
authorDerick Rethans <derick@php.net>
Thu, 2 Jun 2005 08:31:03 +0000 (08:31 +0000)
committerDerick Rethans <derick@php.net>
Thu, 2 Jun 2005 08:31:03 +0000 (08:31 +0000)
NEWS
ext/standard/string.c

diff --git a/NEWS b/NEWS
index 2f2667a6387e1d657b492f6b763dc36ebeb0270e..bb3c2d8ccb85c2d3a5d1ae03b10ab59e91259afd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ PHP                                                                        NEWS
 - Fixed ext/mysqli to allocate less memory when fetching bound params
   of type (MEDIUM|LONG)BLOB/(MEDIUM|LONG)TEXT. (Andrey)
 - Fixed memory corruption in ImageTTFText() with 64bit systems. (Andrey)
+- Fixed memory corruption in stristr(). (Derick)
 - Fixed bug #33210 (relax jpeg recursive loop protection). (Ilia)
 - Fixed bug #33200 (preg_replace(): magic_quotes_sybase=On makes 'e' modifier
   misbehave). (Jani)
index e44ca6225cf304e8f88079b5d988cb5bad00f7a4..298fbb8378eb69dffafc170bba92ab8ef2176349 100644 (file)
@@ -1382,8 +1382,8 @@ PHP_FUNCTION(stristr)
                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);
+//                     zval_ptr_dtor(haystack);
+//                     zval_ptr_dtor(needle);
                        RETURN_FALSE;
                }
 
@@ -1409,8 +1409,8 @@ PHP_FUNCTION(stristr)
                RETVAL_FALSE;
        }
 
-       zval_ptr_dtor(haystack);
-       zval_ptr_dtor(needle);
+//     zval_ptr_dtor(haystack);
+//     zval_ptr_dtor(needle);
        efree(haystack_orig);
 }
 /* }}} */