summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2006-06-26 22:53:42 +0000
committerAntony Dovgal <tony2001@php.net>2006-06-26 22:53:42 +0000
commitffac3d3c1b8daa31aa35766694ea904e1e57416f (patch)
treec40bb52c8c2534baf30b5cada3ee24596374d912 /ext/zlib/zlib.c
parent887337a84ffe75db53ba0cdacae0c303a72415c6 (diff)
downloadphp-git-ffac3d3c1b8daa31aa35766694ea904e1e57416f.tar.gz
MFB: don't try to inflate empty strings
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 7d38bfe737..e398c26a6e 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -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;