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

index d50dcf148be1c5e8ef8d228db3f20863e62080bd..d3932f41adaa8ebff55dc3aecc4f5a9cca137b9b 100644 (file)
@@ -531,6 +531,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;