From: Ilia Alshanetsky Date: Fri, 2 Sep 2005 17:25:10 +0000 (+0000) Subject: Resolved bug #34240. X-Git-Tag: PRE_NEW_OCI8_EXTENSION~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ed0413de566ee3227078f37896535348e6f5a41;p=php Resolved bug #34240. # Thanks to xuefer at 21cn dot com for providing it. --- diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ff68743ccd..20f2258c5c 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -644,7 +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'; + buffer[outlen + start_offset - ZLIBG(stream).avail_out] = '\0'; } *p_buffer = buffer;