mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-88233: zipfile: handle extras after a zip64 extra (GH-96161)
Previously, any data _after_ the zip64 extra would be removed.
With many new tests.
Fixes GH-88233
(cherry picked from commit 59e86caca8
)
Co-authored-by: Tim Hatch <tim@timhatch.com>
Automerge-Triggered-By: GH:jaraco
This commit is contained in:
parent
1747be4641
commit
62c0327487
3 changed files with 66 additions and 0 deletions
|
@ -211,6 +211,8 @@ def _strip_extra(extra, xids):
|
|||
i = j
|
||||
if not modified:
|
||||
return extra
|
||||
if start != len(extra):
|
||||
buffer.append(extra[start:])
|
||||
return b''.join(buffer)
|
||||
|
||||
def _check_zipfile(fp):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue