You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exiv2/tests/bugfixes/github/test_CVE_2017_14862.py

24 lines
613 B
Python

# -*- coding: utf-8 -*-
import system_tests
class TestCvePoC(system_tests.Case):
url = "https://github.com/Exiv2/exiv2/issues/75"
filename = "{data_path}/008-invalid-mem"
commands = ["{exiv2} " + filename]
stdout = [""]
stderr = ["""{exiv2_exception_message} """ + filename + """:
{kerCorruptedMetadata}
"""]
retval = [1]
def compare_stderr(self, i, command, got_stderr, expected_stderr):
"""
Only check that an exception is thrown for this file
ignore all the warnings on stderr on purpose.
"""
self.assertIn(expected_stderr, got_stderr)