Make libmat2 more robust against corrupted zip files
This commit is contained in:
parent
e312868c4e
commit
01b39aa68c
@ -388,7 +388,7 @@ class ZipParser(ArchiveBasedAbstractParser):
|
|||||||
try:
|
try:
|
||||||
with zipfile.ZipFile(self.filename):
|
with zipfile.ZipFile(self.filename):
|
||||||
pass
|
pass
|
||||||
except zipfile.BadZipFile:
|
except (zipfile.BadZipFile, OSError):
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user