]> granicus.if.org Git - php/commitdiff
MFB: don't try to inflate empty strings
authorAntony Dovgal <tony2001@php.net>
Mon, 26 Jun 2006 22:53:42 +0000 (22:53 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 26 Jun 2006 22:53:42 +0000 (22:53 +0000)
ext/zlib/zlib.c

index 7d38bfe737efb628edb99121279e2bab71bb28b9..e398c26a6ed6f697e0960a2bbb95152835735378 100644 (file)
@@ -528,6 +528,10 @@ PHP_FUNCTION(gzinflate)
                return;
        }
 
+       if (!data_len) {
+               RETURN_FALSE;
+       }
+
        if (limit < 0) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "length (%ld) must be greater or equal zero", limit);
                RETURN_FALSE;