]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #34191 (ob_gzhandler does not enforce trailing \0).
authorIlia Alshanetsky <iliaa@php.net>
Sun, 21 Aug 2005 16:03:21 +0000 (16:03 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 21 Aug 2005 16:03:21 +0000 (16:03 +0000)
NEWS
ext/zlib/zlib.c

diff --git a/NEWS b/NEWS
index dbbf42e7e94cc68a8f1044fa5e8a66f01b16dcdd..5431eff8d6319e0ff643074909c7d0e0bd76079e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,7 @@ PHP                                                                        NEWS
 - Fixed "make test" to work for phpized extensions. (Hartmut, Jani)
 - Fixed failing queries (FALSE returned) with mysqli_query() on 64 bit systems.
   (Andrey)
+- 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)
index d195597b13d5d7ae8a7664fb1e9f8eb2371e5d89..ff68743ccd74a0649623dfc20ef79e7107371017 100644 (file)
@@ -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;