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

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;