From: Jeremy Hylton Date: Wed, 13 Aug 1997 21:39:18 +0000 (+0000) Subject: Must update the available space in the output buffer after X-Git-Tag: v1.5a3~75 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a74ef66ac82edd5a587606daef57ff6c26279280;p=python Must update the available space in the output buffer after realloc. (Fixed in PyZlib_unflush.) --- diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 04ffabbaee..1edfab40da 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -449,7 +449,9 @@ PyZlib_objdecompress(self, args) self->zst.next_out=buf+length; self->zst.avail_out=ADDCHUNK; length += ADDCHUNK; + err=inflate(&(self->zst), Z_NO_FLUSH); + } while (self->zst.avail_in!=0 && err==Z_OK); if (err!=Z_OK && err!=Z_STREAM_END) { @@ -547,6 +549,7 @@ PyZlib_unflush(self, args) return NULL; } self->zst.next_out=buf+length; + self->zst.avail_out = ADDCHUNK; length += ADDCHUNK; err=inflate(&(self->zst), Z_FINISH); } while (err==Z_OK);