summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/tarfile.py2
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()