diff --git a/test/data/issue_2339_poc.tiff b/test/data/issue_2339_poc.tiff new file mode 100644 index 00000000..e999d0b2 Binary files /dev/null and b/test/data/issue_2339_poc.tiff differ diff --git a/tests/bugfixes/github/test_issue_2339.py b/tests/bugfixes/github/test_issue_2339.py new file mode 100644 index 00000000..b9e63ced --- /dev/null +++ b/tests/bugfixes/github/test_issue_2339.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, check_no_ASAN_UBSAN_errors + +class issue_2339_printDegrees_integer_overflow(metaclass=CaseMeta): + url = "https://github.com/Exiv2/exiv2/issues/2339" + filename = "$data_path/issue_2339_poc.tiff" + commands = ["$exiv2 -q -pa $filename"] + retval = [0] + stderr = [""] + stdout = ["""Exif.Image.ExifTag SLong 7 2 10 538976288 -2023161847 7 4 -822083584 +Exif.GPSInfo.GPSDestLatitude Float 3 (9.80908925027372e-45 5.60519385729927e-45 -2147483648) +"""] + diff --git a/tests/regression_tests/test_regression_allfiles.py b/tests/regression_tests/test_regression_allfiles.py index 6a9d5a2e..a2b51393 100644 --- a/tests/regression_tests/test_regression_allfiles.py +++ b/tests/regression_tests/test_regression_allfiles.py @@ -94,6 +94,7 @@ def get_valid_files(data_dir): "issue_2178_poc.jp2", "issue_2268_poc.jp2", "issue_2320_poc.jpg", + "issue_2339_poc.tiff", "issue_ghsa_583f_w9pm_99r2_poc.jp2", "issue_ghsa_7569_phvm_vwc2_poc.jp2", "issue_ghsa_mxw9_qx4c_6m8v_poc.jp2",