com php-src: Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2: ext/standard/formatted_print.c
| From: | Dmitry Stogov | Date: | Thu, 06 Mar 2014 11:03:22 +0000 |
| Subject: | com php-src: Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2: ext/standard/formatted_print.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77730@lists.php.net to get a copy of this message | ||
Commit: 9eb9ba3aa8817a3c70eb14a7842f59787d61dd0d
Author: Xinchen Hui <laruence@gmail.com> Thu, 6 Mar 2014 19:03:22 +0800
Parents: 11166882c05d9d194c31d6fc320260922af9567c 08aadb063853a31af16c4eb3ac2a7e3dab13db46
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9eb9ba3aa8817a3c70eb14a7842f59787d61dd0d
Log:
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
Conflicts:
ext/standard/formatted_print.c
Changed paths:
MM ext/standard/formatted_print.c
Diff:
diff --cc ext/standard/formatted_print.c
index df5b22c,325b242..1ffc836
--- 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;
}