From 1aac6063a4924f1595f94d1c53a750b751e04807 Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 18 Feb 2004 19:49:17 +0000 Subject: [PATCH] MFH: Fixed bug #27295 (memory leak inside sscanf()). --- NEWS | 1 + ext/standard/scanf.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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); -- 2.40.0