diff --git a/test/data/tiffimage_int-out-of-bound-read-poc-2 b/test/data/tiffimage_int-out-of-bound-read-poc-2 new file mode 100644 index 00000000..555cf7a9 Binary files /dev/null and b/test/data/tiffimage_int-out-of-bound-read-poc-2 differ diff --git a/tests/bugfixes/github/test_issue_590.py b/tests/bugfixes/github/test_issue_590.py new file mode 100644 index 00000000..c31662c5 --- /dev/null +++ b/tests/bugfixes/github/test_issue_590.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +import system_tests + + +URL = "https://github.com/Exiv2/exiv2/issues/590" + + +@system_tests.CopyFiles("$data_path/tiffimage_int-out-of-bound-read-poc-2") +class TiffImageIntOutOfBoundsRead(metaclass=system_tests.CaseMeta): + """ + Regression test for the second issue reported in #590. + """ + + filename = system_tests.path( + "$data_path/tiffimage_int-out-of-bound-read-poc-2_copy" + ) + + compare_stderr = system_tests.check_no_ASAN_UBSAN_errors + + commands = ["$exiv2 -Y 2011 -O 02 -D 29 adjust $filename"] + stdout = [""] + stderr = [""] + retval = [0]