From: Ilia Alshanetsky Date: Wed, 18 Feb 2004 19:49:17 +0000 (+0000) Subject: MFH: Fixed bug #27295 (memory leak inside sscanf()). X-Git-Tag: php-4.3.5RC4~87 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1aac6063a4924f1595f94d1c53a750b751e04807;p=php MFH: Fixed bug #27295 (memory leak inside sscanf()). --- diff --git a/NEWS b/NEWS index 0088192f7e..c979804860 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Feb 2004, Version 4.3.5 +- Fixed bug #27295 (memory leak inside sscanf()). (Ilia) - Fixed bug #27293 (two crashes inside image2wbmp()). (Ilia) - Fixed bug #27278 (*printf() functions treat arguments as if passed by reference). (Ilia) diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index fe4bc3ef14..f86dd8e997 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -923,7 +923,7 @@ PHPAPI int php_sscanf_internal( char *string, char *format, if (!(flags & SCAN_SUPPRESS)) { if (numVars) { current = args[objIndex++]; - convert_to_string( *current ); + zval_dtor( *current ); ZVAL_STRINGL( *current, string, end-string, 1); } else { add_index_stringl(*return_value, objIndex++, string, end-string, 1);