mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
backport r60116 - fix zipfile to work with archives having file
headers beyond the signed 2**31 byte boundary.
This commit is contained in:
parent
c223c6cb41
commit
1cc98af8a1
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue