From 386e464e1f70cc51ca947d34874f38c55bed603f Mon Sep 17 00:00:00 2001 From: Kevin Backhouse Date: Mon, 19 Apr 2021 11:32:17 +0100 Subject: [PATCH] Regression test for https://github.com/Exiv2/exiv2/issues/1570. --- test/data/issue_1570_poc.bmff | Bin 0 -> 113 bytes tests/bugfixes/github/test_issue_1570.py | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/data/issue_1570_poc.bmff create mode 100644 tests/bugfixes/github/test_issue_1570.py diff --git a/test/data/issue_1570_poc.bmff b/test/data/issue_1570_poc.bmff new file mode 100644 index 0000000000000000000000000000000000000000..ef41d16ffeaf76652b3b345d8746bfb6b7a43541 GIT binary patch literal 113 zcmZQzU=U0zsVwkibZ1~>U})!JU|^6aEzL~XS9SjM^p#F8<`mAHGV$^HH9&Em%$)pW zUb+7bCw+Z`gBTcW7<{?@r?qD?uy8Oia57{T7o-ABbBros0Eq!L#Ky)l$TPhC&vIPV M)Wx3(2>vkv0JF3q82|tP literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_1570.py b/tests/bugfixes/github/test_issue_1570.py new file mode 100644 index 00000000..e0ec7854 --- /dev/null +++ b/tests/bugfixes/github/test_issue_1570.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, path + + +class BmffImageReadMetadataOutOfBoundsRead(metaclass=CaseMeta): + """ + Regression test for the bug described in: + https://github.com/Exiv2/exiv2/issues/1570 + """ + url = "https://github.com/Exiv2/exiv2/issues/1570" + + filename = path("$data_path/issue_1570_poc.bmff") + commands = ["$exiv2 $filename"] + stdout = [""] + stderr = [ +"""$filename1: Could not write metadata to file: $kerCorruptedMetadata +"""] + retval = [1]