exiv2/tests/bugfixes/github/test_issue_1833.py
Luis Diaz 047f6b733e Change logic to determine if segment has size
Note that the failing tests that had to be adapted were bad formed files
from FUZZERs. We should not consider invalid markers like 0x00 or 0x52
but only undefined APPn markers.
2022-04-10 10:53:36 +02:00

20 lines
565 B
Python

# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
class TiffMnEntryDoCountInvalidTiffType(metaclass=CaseMeta):
"""
Test for the bug described in:
https://github.com/Exiv2/exiv2/issues/1833
"""
url = "https://github.com/Exiv2/exiv2/issues/1833"
filename = path("$data_path/issue_1833_poc.jpg")
commands = ["$exiv2 -pS $filename"]
stderr = ["""$exiv2_exception_message """ + filename + """:
$kerFailedToReadImageData
"""]
retval = [1]
compare_stdout = check_no_ASAN_UBSAN_errors