From d224f897b063925ed332aad5388196e065d4bb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 11 Oct 2018 18:28:14 +0200 Subject: [PATCH] [testsuite] Add reproducer for #216 The bug got resolved by PR #461 (slices). --- ...controlled-recursion_printIFDStructure.tif | Bin 0 -> 64 bytes tests/bugfixes/github/test_issue_216.py | 24 ++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 test/data/exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif create mode 100644 tests/bugfixes/github/test_issue_216.py diff --git a/test/data/exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif b/test/data/exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif new file mode 100644 index 0000000000000000000000000000000000000000..9e50cf9710c49d39c14c064a6f504d4f2cf6cc2b GIT binary patch literal 64 zcmebEWzb?^VBlb2XJlYt2C^7|kb#jI%x2&ago=SA#KCM{uxbVd7KNlrg~S{HLqP)? literal 0 HcmV?d00001 diff --git a/tests/bugfixes/github/test_issue_216.py b/tests/bugfixes/github/test_issue_216.py new file mode 100644 index 00000000..7d7f29a0 --- /dev/null +++ b/tests/bugfixes/github/test_issue_216.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- + +import system_tests + + +class UncontrolledRecursion(metaclass=system_tests.CaseMeta): + url = "https://github.com/Exiv2/exiv2/issues/216" + + filename = system_tests.path( + "$data_path/" + "exiv2_0-26_exiv2_uncontrolled-recursion_printIFDStructure.tif" + ) + + commands = ["$exiv2 -pR $filename"] + retval = [1] + stdout = [ + """STRUCTURE OF TIFF FILE (MM): $filename + address | tag | type | count | offset | value + 10 | 0x0100 ImageWidth | SHORT | 1 | | 1 + 22 | 0x0103 Compression | SHORT | 0 | | + 34 | 000000 GPSVersionID | BYTE | 0 | | """ + ] + + compare_stderr = system_tests.check_no_ASAN_UBSAN_errors