diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-03-28 08:58:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-28 08:58:51 (GMT) |
commit | d445147dfa04bfd52f1cfa7058f4428ca4c7c694 (patch) | |
tree | 6de46458a4b26fcdeea865679a7940c475053650 /Lib/zipfile.py | |
parent | 3288923b7aac4b4e5021b955c6f0b445cb034e46 (diff) | |
download | cpython-d445147dfa04bfd52f1cfa7058f4428ca4c7c694.zip cpython-d445147dfa04bfd52f1cfa7058f4428ca4c7c694.tar.gz cpython-d445147dfa04bfd52f1cfa7058f4428ca4c7c694.tar.bz2 |
[3.10] gh-88233: zipfile: handle extras after a zip64 extra (GH-96161) (#102087)
Previously, any data _after_ the zip64 extra would be removed.
With many new tests.
Fixes GH-88233
(cherry picked from commit 59e86caca812fc993c5eb7dc8ccd1508ffccba86)
Co-authored-by: Tim Hatch <tim@timhatch.com>
Diffstat (limited to 'Lib/zipfile.py')
-rw-r--r-- | Lib/zipfile.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 23e4ee4..42e11d7 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -185,6 +185,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): |