From 6b5453c9d5dda8fbb803d4c10a4485694c1f82ec Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Wed, 6 Jul 2022 13:22:05 +0100 Subject: [PATCH] Regression test for https://github.com/Exiv2/exiv2/issues/2268 --- test/data/issue_2268_poc.jp2 | Bin 0 -> 97 bytes tests/bugfixes/github/test_issue_2268.py | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 test/data/issue_2268_poc.jp2 create mode 100644 tests/bugfixes/github/test_issue_2268.py diff --git a/test/data/issue_2268_poc.jp2 b/test/data/issue_2268_poc.jp2 new file mode 100644 index 0000000000000000000000000000000000000000..64fb231c0bd904b0c66d4f5012c8d378c0ebb1d6 GIT binary patch literal 97 zcmZQzVBpCLP*C9IYUg5LU=WEdsVvAUFj4@r83Z7-E|8xAV>rRU X%+3xJ<4?}d0g9mm0f+#j0s|8OE)Wf} literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_2268.py b/tests/bugfixes/github/test_issue_2268.py new file mode 100644 index 00000000..d678fea2 --- /dev/null +++ b/tests/bugfixes/github/test_issue_2268.py @@ -0,0 +1,13 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, check_no_ASAN_UBSAN_errors + +class issue_2268_jp2_assert(metaclass=CaseMeta): + url = "https://github.com/Exiv2/exiv2/issues/2268" + filename = "$data_path/issue_2268_poc.jp2" + commands = ["$exiv2 -pS $filename"] + retval = [1] + stderr = ["""$exiv2_exception_message $filename: +$kerCorruptedMetadata +"""] + compare_stdout = check_no_ASAN_UBSAN_errors