[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)

This commit is contained in:
Andrew M. Kuchling 2003-10-24 17:38:34 +00:00
parent 1b3c04b510
commit 10a444965d
1 changed files with 1 additions and 1 deletions

View File

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