]> granicus.if.org Git - php/commitdiff
MFH: Resolved bug #34240.
authorIlia Alshanetsky <iliaa@php.net>
Fri, 2 Sep 2005 17:25:33 +0000 (17:25 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 2 Sep 2005 17:25:33 +0000 (17:25 +0000)
ext/zlib/zlib.c

index 0341043d97be64b3dba0e193ea4f2f9abdc8b04d..fe468783713235315c92a2820ce1abdf3f4ef918 100644 (file)
@@ -717,7 +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';
+               buffer[outlen + start_offset - ZLIBG(stream).avail_out] = '\0';
        }