diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 1997-08-13 21:39:18 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 1997-08-13 21:39:18 (GMT) |
commit | a74ef66ac82edd5a587606daef57ff6c26279280 (patch) | |
tree | c7b7dfce61ab2a72ce5aacca48665e9cb273bb84 /Modules | |
parent | 00b299afea859017089328a4214b7eacb8c3b515 (diff) | |
download | cpython-a74ef66ac82edd5a587606daef57ff6c26279280.zip cpython-a74ef66ac82edd5a587606daef57ff6c26279280.tar.gz cpython-a74ef66ac82edd5a587606daef57ff6c26279280.tar.bz2 |
Must update the available space in the output buffer after
realloc. (Fixed in PyZlib_unflush.)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zlibmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 04ffabb..1edfab4 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); |