From: Ilia Alshanetsky Date: Sun, 21 Aug 2005 16:05:35 +0000 (+0000) Subject: MFH: Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). X-Git-Tag: php-4.4.1RC1~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e60ddf4860f55370c1bd326e9d473a90c9b3196;p=php MFH: Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). --- diff --git a/NEWS b/NEWS index 0f53b3695e..94d86a0f15 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2005, Version 4.4.1 +- Fixed bug #34191 (ob_gzhandler does not enforce trailing \0). (Ilia) - Fixed bug #34156 (memory usage remains elevated after memory limit is reached). (Ilia) - Fixed bug #34148 (+,- and . not supported as parts of scheme). (Ilia) diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 8b38d955e0..0341043d97 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -717,6 +717,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'; }