summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/gzip.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/gzip.py b/Lib/gzip.py
index 2246c9d..eeef3f8 100644
--- a/Lib/gzip.py
+++ b/Lib/gzip.py
@@ -310,7 +310,7 @@ class GzipFile:
self.fileobj.write(self.compress.flush())
write32u(self.fileobj, self.crc)
# self.size may exceed 2GB, or even 4GB
- write32u(self.fileobj, self.size)
+ write32u(self.fileobj, self.size & 0xffffffffL)
self.fileobj = None
elif self.mode == READ:
self.fileobj = None