summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 6f0f08d298..02889609c7 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -919,7 +919,7 @@ PHP_FUNCTION(gzdeflate)
}
/* }}} */
-/* {{{ proto string gzinflate(string data, int length)
+/* {{{ proto string gzinflate(string data [, int length])
Unzip a gzip-compressed string */
PHP_FUNCTION(gzinflate)
{
@@ -967,7 +967,7 @@ PHP_FUNCTION(gzinflate)
if(! s2) { if(s1) efree(s1); RETURN_FALSE; }
stream.next_in = (Bytef*) Z_STRVAL_PP(data);
- stream.avail_in = (uInt) Z_STRLEN_PP(data);
+ stream.avail_in = (uInt) Z_STRLEN_PP(data) + 1; /* there is room for \0 */
stream.next_out = s2;
stream.avail_out = (uInt) length;