From: Xinchen Hui Date: Thu, 6 Mar 2014 11:03:22 +0000 (+0800) Subject: Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 X-Git-Tag: POST_PHPNG_MERGE~412^2~398 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9eb9ba3aa8817a3c70eb14a7842f59787d61dd0d;p=php Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2 Conflicts: ext/standard/formatted_print.c --- 9eb9ba3aa8817a3c70eb14a7842f59787d61dd0d diff --cc ext/standard/formatted_print.c index df5b22cdf4,325b242122..1ffc836f99 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@@ -491,10 -492,10 +492,13 @@@ php_formatted_print(int param_count, in PRINTF_DEBUG(("sprintf: getting width\n")); if ((width = php_sprintf_getnumber(format, &inpos)) < 0) { efree(result); + if (newargs) { + efree(newargs); + } php_error_docref(NULL TSRMLS_CC, E_WARNING, "Width must be greater than zero and less than %d", INT_MAX); + if (newargs) { + efree(newargs); + } return NULL; } adjusting |= ADJ_WIDTH; @@@ -510,10 -511,10 +514,13 @@@ if (isdigit((int)format[inpos])) { if ((precision = php_sprintf_getnumber(format, &inpos)) < 0) { efree(result); + if (newargs) { + efree(newargs); + } php_error_docref(NULL TSRMLS_CC, E_WARNING, "Precision must be greater than zero and less than %d", INT_MAX); + if (newargs) { + efree(newargs); + } return NULL; } adjusting |= ADJ_PRECISION; @@@ -532,10 -533,10 +539,13 @@@ if (argnum >= argc) { efree(result); + if (newargs) { + efree(newargs); + } php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too few arguments"); + if (newargs) { + efree(newargs); + } return NULL; }