From: Ilia Alshanetsky Date: Sun, 21 Aug 2005 16:02:25 +0000 (+0000) Subject: Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). X-Git-Tag: PRE_NEW_OCI8_EXTENSION~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c8dedc16a894e233d8cdf7850df6f07c9ac303fc;p=php Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). --- 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;