From: Ilia Alshanetsky Date: Sat, 22 Sep 2007 15:25:46 +0000 (+0000) Subject: Fixed memory leak inside pack() (coverity issues #398,#399,#400) X-Git-Tag: php-5.2.5RC1~100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9307163e67642a8a0be3448c66fb598d9b18a1dd;p=php Fixed memory leak inside pack() (coverity issues #398,#399,#400) --- diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 1e7acac6e1..161eb31edd 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -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; \ } \