]> granicus.if.org Git - python/commitdiff
Must update the available space in the output buffer after
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 13 Aug 1997 21:39:18 +0000 (21:39 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 13 Aug 1997 21:39:18 +0000 (21:39 +0000)
realloc. (Fixed in PyZlib_unflush.)

Modules/zlibmodule.c

index 04ffabbaee517803bbde0effae7c63335a5d7a3f..1edfab40da77f2eaab1a1dec719d75d0e7bbbce8 100644 (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);