]> granicus.if.org Git - python/commitdiff
Fixes/Accepts Patch for issue1189216 - Work properly with archives
authorGregory P. Smith <greg@mad-scientist.com>
Sat, 19 Jan 2008 23:10:52 +0000 (23:10 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Sat, 19 Jan 2008 23:10:52 +0000 (23:10 +0000)
that have file headers past the 2**31 byte boundary.

Lib/zipfile.py
Misc/NEWS

index 471cffc986edb8c1e75f4944983a270f3973d104..eb00b34daa4195318402687fe0f770fa2f8f5b82 100644 (file)
@@ -32,9 +32,9 @@ ZIP_DEFLATED = 8
 # Other ZIP compression methods not supported
 
 # Here are some struct module formats for reading headers
-structEndArchive = "<4s4H2lH"     # 9 items, end of archive, 22 bytes
+structEndArchive = "<4s4H2LH"     # 9 items, end of archive, 22 bytes
 stringEndArchive = "PK\005\006"   # magic number for end of archive record
-structCentralDir = "<4s4B4HlLL5HLl"# 19 items, central directory, 46 bytes
+structCentralDir = "<4s4B4HlLL5HLL"# 19 items, central directory, 46 bytes
 stringCentralDir = "PK\001\002"   # magic number for central directory
 structFileHeader = "<4s2B4HlLL2H"  # 12 items, file header record, 30 bytes
 stringFileHeader = "PK\003\004"   # magic number for file header
index a068876bad4c93f064ef7b0486e0d588d4777c5e..e988fc7301046ad44928494720cc9b07640b9bfd 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -369,6 +369,9 @@ Core and builtins
 Library
 -------
 
+- #1189216: Fix the zipfile module to work on archives with headers
+  past the 2**31 byte boundary.
+
 - #1336: fix a race condition in subprocess.Popen if the garbage
   collector kicked in at the wrong time that would cause the process
   to hang when the child wrote to stderr.