We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 964281a commit feccdb2Copy full SHA for feccdb2
Lib/zipfile.py
@@ -438,7 +438,9 @@ def _decodeExtra(self):
438
unpack = struct.unpack
439
while len(extra) >= 4:
440
tp, ln = unpack('<HH', extra[:4])
441
- if tp == 1:
+ if ln+4 > len(extra):
442
+ raise BadZipFile("Corrupt extra field %04x (size=%d)" % (tp, ln))
443
+ if tp == 0x0001:
444
if ln >= 24:
445
counts = unpack('<QQQ', extra[4:28])
446
elif ln == 16:
0 commit comments