diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-10-24 17:38:34 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-10-24 17:38:34 (GMT) |
commit | 10a444965dd537f4fc0483e960941cfdac8b2e11 (patch) | |
tree | dc180dcf3c96e60d3ecd7e37316b04a1a90586d8 /Lib | |
parent | 1b3c04b510c875fd3e31d13b73e76d3702bf99a0 (diff) | |
download | cpython-10a444965dd537f4fc0483e960941cfdac8b2e11.zip cpython-10a444965dd537f4fc0483e960941cfdac8b2e11.tar.gz cpython-10a444965dd537f4fc0483e960941cfdac8b2e11.tar.bz2 |
[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)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/tarfile.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/tarfile.py b/Lib/tarfile.py index 9dd8601..26f9c7f 100644 --- a/Lib/tarfile.py +++ b/Lib/tarfile.py @@ -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() |