Hello! We are running our annual fundraising. Please consider making a donation if you value this freely available service or want to support people around the world working towards liberatory social change. https://riseup.net/donate.

Commit e312868c authored by jvoisin's avatar jvoisin
Browse files

Increase a bit the robustness of mat2

Those issues were found via https://github.com/google/atheris
parent b71bafd2
Pipeline #71000 passed with stages
in 3 minutes and 19 seconds
......@@ -13,7 +13,8 @@ class MutagenParser(abstract.AbstractParser):
def __init__(self, filename):
if mutagen.File(self.filename) is None:
raise ValueError
except mutagen.MutagenError:
raise ValueError
......@@ -26,7 +26,10 @@ class SVGParser(exiftool.ExiftoolParser):
def remove_all(self) -> bool:
svg = Rsvg.Handle.new_from_file(self.filename)
svg = Rsvg.Handle.new_from_file(self.filename)
except GLib.GError:
raise ValueError
dimensions = svg.get_dimensions()
surface = cairo.SVGSurface(self.output_filename,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment