com php-src: Fixed ext/standard/tests/strings/pack64_3 2.phpt failure (In PHP7, we must not fr ee array of arguments recieved using "+"):
ext/standard/pack.c
| From: | Dmitry Stogov | Date: | Wed, 15 Oct 2014 08:38:04 +0000 |
| Subject: | com php-src: Fixed ext/standard/tests/strings/pack64_3 2.phpt failure (In PHP7, we must not fr ee array of arguments recieved using "+"): ext/standard/pack.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82314@lists.php.net to get a copy of this message | ||
Commit: 52b93004d070ff59a1ed6dcd91c8b08935fc1c04
Author: Dmitry Stogov <dmitry@zend.com> Wed, 15 Oct 2014 12:38:04 +0400
Parents: 01d17228dc62ea30b7ad25835f049ccd1998b5f2
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=52b93004d070ff59a1ed6dcd91c8b08935fc1c04
Log:
Fixed ext/standard/tests/strings/pack64_32.phpt failure (In PHP7, we must not free array of
arguments recieved using "+")
Changed paths:
M ext/standard/pack.c
Diff:
diff --git a/ext/standard/pack.c b/ext/standard/pack.c
index a95c226..07206c8 100644
--- a/ext/standard/pack.c
+++ b/ext/standard/pack.c
@@ -55,7 +55,6 @@
#define INC_OUTPUTPOS(a,b) \
if ((a) < 0 || ((INT_MAX - outputpos)/((int)b)) < (a)) { \
- efree(argv); \
efree(formatcodes); \
efree(formatargs); \
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer overflow in format
string", code); \
@@ -210,7 +209,6 @@ PHP_FUNCTION(pack)
case 'J':
case 'P':
#if SIZEOF_ZEND_LONG < 8
- efree(argv);
efree(formatcodes);
efree(formatargs);
php_error_docref(NULL TSRMLS_CC, E_WARNING, "64-bit format codes are not available for
32-bit versions of PHP");