com php-src: Fix double free in formatted_print.c: NEWS ext/standard/formatted_print.c

From: Date: Sun, 06 Dec 2015 01:54:28 +0000
Subject: com php-src: Fix double free in formatted_print.c: NEWS ext/standard/formatted_print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-90098@lists.php.net to get a copy of this message
Commit: aa8cac578e22e65ceda63d3518d696ccfc920494 Author: Bob Weinand <bobwei9@hotmail.com> Sun, 6 Dec 2015 02:54:28 +0100 Parents: 559ede17e109adec5dadff3290090e7141ad40ae Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aa8cac578e22e65ceda63d3518d696ccfc920494 Log: Fix double free in formatted_print.c Changed paths: M NEWS M ext/standard/formatted_print.c Diff: diff --git a/NEWS b/NEWS index 788aa0f..266b227 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ PHP NEWS . Fixed bug #70987 (static::class within Closure::call() causes segfault). (Andrea) . Fixed bug #71013 (Incorrect exception handler with yield from). (Bob) + .. Fixed double free in error condition of format printer. (Bob) - CLI server: . Fixed bug #71005 (Segfault in php_cli_server_dispatch_router()). (Adam) diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 081dfc4..e206bb9 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -518,9 +518,6 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o efree(newargs); } php_error_docref(NULL, E_WARNING, "Width must be greater than zero and less than %d", INT_MAX); - if (newargs) { - efree(newargs); - } return NULL; } adjusting |= ADJ_WIDTH; @@ -540,9 +537,6 @@ php_formatted_print(zend_execute_data *execute_data, int use_array, int format_o efree(newargs); } php_error_docref(NULL, E_WARNING, "Precision must be greater than zero and less than %d", INT_MAX); - if (newargs) { - efree(newargs); - } return NULL; } adjusting |= ADJ_PRECISION;

« previous php.cvs (#90098) next »