diff --git a/test/data/issue_1838_poc.crw b/test/data/issue_1838_poc.crw new file mode 100644 index 0000000000..efd88f3b9a Binary files /dev/null and b/test/data/issue_1838_poc.crw differ diff --git a/tests/bugfixes/github/test_issue_1838.py b/tests/bugfixes/github/test_issue_1838.py new file mode 100644 index 0000000000..aa02f1dd0b --- /dev/null +++ b/tests/bugfixes/github/test_issue_1838.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors + +class FloatToRationalCastOutOfRange(metaclass=CaseMeta): + """ + Test for the bug described in: + https://github.com/Exiv2/exiv2/issues/1838 + """ + url = "https://github.com/Exiv2/exiv2/issues/1838" + + filename = path("$data_path/issue_1838_poc.crw") + commands = ["$exiv2 $filename"] + stderr = [""] + retval = [0] + + compare_stdout = check_no_ASAN_UBSAN_errors