Must update the available space in the output buffer after

realloc. (Fixed in PyZlib_unflush.)
This commit is contained in:
Jeremy Hylton 1997-08-13 21:39:18 +00:00
parent 00b299afea
commit a74ef66ac8
1 changed files with 3 additions and 0 deletions

View File

@ -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);