From 01b39aa68c876ecad1b20277ebc65dfd6b932f1f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Mon, 13 Dec 2021 19:44:44 +0100 Subject: [PATCH] Make libmat2 more robust against corrupted zip files --- libmat2/archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmat2/archive.py b/libmat2/archive.py index cfc9671..ec44ebd 100644 --- a/libmat2/archive.py +++ b/libmat2/archive.py @@ -388,7 +388,7 @@ class ZipParser(ArchiveBasedAbstractParser): try: with zipfile.ZipFile(self.filename): pass - except zipfile.BadZipFile: + except (zipfile.BadZipFile, OSError): raise ValueError @staticmethod