1. Victor Stinner
  2. hachoir

Commits

nneonneo  committed 052f560

parser/common/deflate: ensure that the unconsumed tail is always fed to the decompressor

  • Participants
  • Parent commits 4947993
  • Branches default

Comments (0)

Files changed (1)

File hachoir-parser/hachoir_parser/common/deflate.py

View file
 
         def __call__(self, size, data=None):
             if data is None:
-                data = self.gzip.unconsumed_tail
-            return self.gzip.decompress(data, size)
+                data = ''
+            return self.gzip.decompress(self.gzip.unconsumed_tail+data, size)
 
     class DeflateStreamWbits(DeflateStream):
         def __init__(self, stream):