[tests] Add regression test for #1019

(cherry picked from commit 73b874fb14d02578f876aa7dd404cf7c07b6dc4e)
This commit is contained in:
Dan Čermák 2019-10-07 23:25:00 +02:00 committed by mergify-bot
parent b7890776c6
commit 0a4fdae360
3 changed files with 15 additions and 0 deletions

BIN
test/data/POC-file_issue_1019 Executable file

Binary file not shown.

View File

@ -0,0 +1,14 @@
from system_tests import CaseMeta, path
class OverreadInCiffDirectoryReadDirectory(metaclass=CaseMeta):
filename = path("$data_path/POC-file_issue_1019")
commands = ["$exiv2 -pv $filename"]
stdout = [""]
stderr = [
"""$exiv2_exception_message $filename:
$kerOffsetOutOfRange
"""
]
retval = [1]

View File

@ -20,6 +20,7 @@ easyaccess_test: ${ENV:exiv2_path}/easyaccess-test${ENV:binary_extension}
taglist: ${ENV:exiv2_path}/taglist${ENV:binary_extension}
[variables]
kerOffsetOutOfRange: Offset out of range
kerFailedToReadImageData: Failed to read image data
kerCorruptedMetadata: corrupted image metadata
kerInvalidMalloc: invalid memory allocation request