cvs: php-src(PHP_5_2) /ext/standard pack.c
| From: | Ilia Alshanetsky | Date: | Sat, 22 Sep 2007 15:25:46 +0000 |
| Subject: | cvs: php-src(PHP_5_2) /ext/standard pack.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-46279@lists.php.net to get a copy of this message | ||
iliaa Sat Sep 22 15:25:46 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard pack.c
Log:
Fixed memory leak inside pack() (coverity issues #398,#399,#400)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/pack.c?r1=1.57.2.5.2.5&r2=1.57.2.5.2.6&diff_format=u
Index: php-src/ext/standard/pack.c
diff -u php-src/ext/standard/pack.c:1.57.2.5.2.5 php-src/ext/standard/pack.c:1.57.2.5.2.6
--- php-src/ext/standard/pack.c:1.57.2.5.2.5 Wed Jun 6 22:04:04 2007
+++ php-src/ext/standard/pack.c Sat Sep 22 15:25:46 2007
@@ -15,7 +15,7 @@
| Author: Chris Schneider <cschneid@relog.ch> |
+----------------------------------------------------------------------+
*/
-/* $Id: pack.c,v 1.57.2.5.2.5 2007/06/06 22:04:04 iliaa Exp $ */
+/* $Id: pack.c,v 1.57.2.5.2.6 2007/09/22 15:25:46 iliaa Exp $ */
#include "php.h"
@@ -56,6 +56,9 @@
#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); \
RETURN_FALSE; \
} \