]> granicus.if.org Git - php/commitdiff
MFB: Fixed memory leak inside pack() (coverity issues #398,#399,#400)
authorIlia Alshanetsky <iliaa@php.net>
Sat, 22 Sep 2007 15:26:51 +0000 (15:26 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sat, 22 Sep 2007 15:26:51 +0000 (15:26 +0000)
ext/standard/pack.c

index 2ba014dc5c40cb0045c677aa7f9cd4c9987a09d8..d6a6e31f61386ea18339d0b5c81d99da15a47946 100644 (file)
@@ -55,6 +55,9 @@
 
 #define INC_OUTPUTPOS(a,b) \
        if ((a) < 0 || ((INT_MAX - outputpos)/(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; \
        } \