Adapt tests to changes in JP2

This commit is contained in:
Luis Díaz Más 2022-03-18 14:35:49 +01:00
parent e7478f744d
commit 2b9f6ccf6b
5 changed files with 14 additions and 6 deletions

View File

@ -12,6 +12,9 @@ class TiffDirectoryWriteDirEntryAssert(metaclass=CaseMeta):
filename = path("$tmp_path/issue_1845_poc.jp2")
commands = ["$exiv2 -q -D +1 ad $filename"]
stderr = [""]
stderr = [
"""$exception_in_adjust """ + filename + """:
$kerCorruptedMetadata
"""]
stdout = [""]
retval = [0]
retval = [1]

View File

@ -12,7 +12,7 @@ class Jp2ImagePrintStructureICC(metaclass=CaseMeta):
filename = path("$data_path/issue_ghsa_583f_w9pm_99r2_poc.jp2")
commands = ["$exiv2 -p C $filename"]
stdout = [""]
stderr = ["""Exiv2 exception in print action for file $filename:
stderr = ["""$exiv2_exception_message """ + filename + """:
$kerCorruptedMetadata
"""]
retval = [1]

View File

@ -13,6 +13,8 @@ class Jp2ImageEncodeJp2HeaderOutOfBoundsRead2(metaclass=CaseMeta):
filename = path("$tmp_path/issue_ghsa_mxw9_qx4c_6m8v_poc.jp2")
commands = ["$exiv2 rm $filename"]
stdout = [""]
retval = [0]
compare_stderr = check_no_ASAN_UBSAN_errors
stderr = [
"""$exception_in_erase """ + filename + """:
$kerCorruptedMetadata
"""]
retval = [1]

View File

@ -90,6 +90,7 @@ def get_valid_files(data_dir):
"issue_960.poc.webp",
"issue_ghsa_583f_w9pm_99r2_poc.jp2",
"issue_ghsa_7569_phvm_vwc2_poc.jp2",
"issue_ghsa_mxw9_qx4c_6m8v_poc.jp2",
"pocIssue283.jpg",
"poc_1522.jp2",
"xmpsdk.xmp",

View File

@ -50,5 +50,7 @@ addition_overflow_message: Overflow in addition
exiv2_exception_message: Exiv2 exception in print action for file
exiv2_overflow_exception_message: std::overflow_error exception in print action for file
exception_in_extract: Exiv2 exception in extract action for file
exception_in_adjust: Exiv2 exception in adjust action for file
exception_in_erase: Exiv2 exception in erase action for file
uncaught_exception: Uncaught exception:
no_exif_data_found_retval: 253