exiv2/tests/bugfixes/github/test_issue_1713.py
Kevin Backhouse b35cc5ffa6
Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=37363
Do some basic XML validation before running the xmpsdk library to avoid bugs in xmpsdk.
2021-08-21 12:42:24 +01:00

26 lines
651 B
Python

# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class InvalidDateXMP(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/1713
"""
url = "https://github.com/Exiv2/exiv2/issues/1713"
filename = path("$data_path/issue_1713_poc.xmp")
commands = ["$exiv2 -Ph $filename"]
stderr = [
"""Error: XMP Toolkit error 201: Error in XMLValidator
Warning: Failed to decode XMP metadata.
"""
]
retval = [0]
def compare_stdout(self, i, command, got_stdout, expected_stdout):
""" We don't care about the stdout, just don't crash """
pass