diff --git a/test/data/issue_950 b/test/data/issue_950 new file mode 100644 index 0000000000..5175d54e55 Binary files /dev/null and b/test/data/issue_950 differ diff --git a/tests/bugfixes/github/test_issue_950.py b/tests/bugfixes/github/test_issue_950.py new file mode 100644 index 0000000000..ee28788c23 --- /dev/null +++ b/tests/bugfixes/github/test_issue_950.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- + +import os +import shutil + +import system_tests + +URL = "https://github.com/Exiv2/exiv2/issues/950" + +@system_tests.CopyFiles("$data_path/issue_950") +class TiffImageIntOutOfBoundsRead(metaclass=system_tests.CaseMeta): + """ + Regression test for the issue reported in #950. + """ + + def setUp(self): + shutil.copy(self.filename, self.filenameExv) + + def tearDown(self): + os.remove(self.filenameExv) + + filename = system_tests.path("$data_path/issue_950_copy") + filenameExv = system_tests.path("$data_path/issue_950_copy.exv") + + commands = ["$exiv2 insert $filenameExv"] + stdout = [""] + stderr = ["""$filenameExv: Could not write metadata to file: $kerCorruptedMetadata +"""] + retval = [1]