From e27449da92b13730a5e11182f329d5da98a5e05b Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 9 Nov 2019 13:13:36 +0200 Subject: [PATCH] bpo-38635: Simplify decoding the ZIP64 extra field and make it tolerant to extra data. (GH-16988) --- Lib/zipfile.py | 53 +++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 37 deletions(-) diff --git a/Lib/zipfile.py b/Lib/zipfile.py index 6504e0eee8b..b0afb9da942 100644 --- a/Lib/zipfile.py +++ b/Lib/zipfile.py @@ -465,44 +465,23 @@ class ZipInfo (object): if ln+4 > len(extra): raise BadZipFile("Corrupt extra field %04x (size=%d)" % (tp, ln)) if tp == 0x0001: - if ln >= 24: - counts = unpack('