1
0
mirror of synced 2024-11-22 09:14:23 +01:00

Make libmat2 more robust against corrupted zip files

This commit is contained in:
jvoisin 2021-12-13 19:44:44 +01:00
parent e312868c4e
commit 01b39aa68c

View File

@ -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