summaryrefslogtreecommitdiff
path: root/libmat2/audio.py
diff options
context:
space:
mode:
authorjvoisin2021-12-13 19:00:41 +0100
committerjvoisin2021-12-13 19:00:41 +0100
commite312868c4edab227b772f4795e8adff96da4bf4d (patch)
tree734340fd47f0f15d43404bc8a3a48f4b3390af57 /libmat2/audio.py
parentb71bafd2cfaec838844447676f9fae30abe432ef (diff)
Increase a bit the robustness of mat2
Those issues were found via https://github.com/google/atheris
Diffstat (limited to 'libmat2/audio.py')
-rw-r--r--libmat2/audio.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmat2/audio.py b/libmat2/audio.py
index bd7add9..3f3a757 100644
--- a/libmat2/audio.py
+++ b/libmat2/audio.py
@@ -13,7 +13,8 @@ class MutagenParser(abstract.AbstractParser):
13 def __init__(self, filename): 13 def __init__(self, filename):
14 super().__init__(filename) 14 super().__init__(filename)
15 try: 15 try:
16 mutagen.File(self.filename) 16 if mutagen.File(self.filename) is None:
17 raise ValueError
17 except mutagen.MutagenError: 18 except mutagen.MutagenError:
18 raise ValueError 19 raise ValueError
19 20