summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/zipfile.py2
-rw-r--r--Misc/NEWS3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py
index 5f24187..de06d82 100644
--- a/Lib/zipfile.py
+++ b/Lib/zipfile.py
@@ -1132,7 +1132,7 @@ class ZipFile:
self.fp.flush()
if zinfo.flag_bits & 0x08:
# Write CRC and file sizes after the file data
- self.fp.write(struct.pack("<lLL", zinfo.CRC, zinfo.compress_size,
+ self.fp.write(struct.pack("<LLL", zinfo.CRC, zinfo.compress_size,
zinfo.file_size))
self.filelist.append(zinfo)
self.NameToInfo[zinfo.filename] = zinfo
diff --git a/Misc/NEWS b/Misc/NEWS
index 0f6f901..32101b5 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -32,6 +32,9 @@ Library
- Issue #6271: mmap tried to close invalid file handle (-1) when anonymous.
(On Unix)
+- Issue #1202: zipfile module would cause a struct.error when attempting to
+ store files with a CRC32 > 2**31-1.
+
Extension Modules
-----------------