summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-08-21 16:02:25 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-08-21 16:02:25 +0000
commitc8dedc16a894e233d8cdf7850df6f07c9ac303fc (patch)
treecbc978adad793059638b2b758af50b518810acb9
parent074d82cbe06928f7906ed9546ce616d5b7b91dbe (diff)
downloadphp-git-c8dedc16a894e233d8cdf7850df6f07c9ac303fc.tar.gz
Fixed bug #34191 (ob_gzhandler does not enforce trailing \0).
-rw-r--r--ext/zlib/zlib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index d195597b13..ff68743ccd 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -644,6 +644,7 @@ static int php_do_deflate(uint str_length, Bytef **p_buffer, uint *p_buffer_len,
if (do_end) {
err = deflate(&ZLIBG(stream), Z_FINISH);
+ buffer[outlen - ZLIBG(stream).avail_out] = '\0';
}
*p_buffer = buffer;