Commit 10a44496 authored by Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too...

[Bug #822668] tarfile raises an exception if the tarfile is gzipped and is too large; the gzip filesize should be written out mod 2**32.  (Reported by Johan Fredrik Ohman)
parent 1b3c04b5
......@@ -357,7 +357,7 @@ class _Stream:
self.buf = ""
if self.type == "gz":
self.fileobj.write(struct.pack("<l", self.crc))
self.fileobj.write(struct.pack("<L", self.pos))
self.fileobj.write(struct.pack("<L", self.pos & 0xffffFFFFL))
if not self._extfileobj:
self.fileobj.close()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment