[New-bugs-announce] [issue39294] zipfile.ZipInfo objects contain invalid 'extra' fields.
report at bugs.python.org
Fri Jan 10 16:57:59 EST 2020
New submission from Bram Stolk <b.stolk at gmail.com>:
This has been tested with Windows Python 2.7 and Python 3.8
If you get the ZipInfo objects of a ZIP file that is larger than 2GiB, then all the ZipInfo entries with a header offset > 2G will report phantom 'extra' data.
zipname = "reallybig.zip"
z = zipfile.ZipFile( zipname )
zi = z.infolist()
for inf in zi:
print( inf.filename, inf.header_offset, inf.extra )
And observe that:
* All entries with offset < 2G will report no extra field.
* All entries with offset > 2G will report extra field.
It's hard to package this up as a self-contained test, because it requires a very large zip to test.
nosy: Bram Stolk
title: zipfile.ZipInfo objects contain invalid 'extra' fields.
versions: Python 3.8
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce