Throw an exception if the data location is invalid. (#842)

This commit is contained in:
Kevin Backhouse
2019-05-15 10:12:02 +01:00
committed by Luis Díaz Más
parent 8dc87a1214
commit 7798ae2557
4 changed files with 25 additions and 5 deletions
+22
View File
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
class InvalidDataLocationInCiffComponentDoRead(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/841
An invalid data location causes an assertion failure.
"""
url = "https://github.com/Exiv2/exiv2/issues/841"
filename = path("$data_path/issue_841_poc.crw")
commands = ["$exiv2 $filename"]
stdout = [""]
stderr = [
"""$exiv2_exception_message $filename:
$kerCorruptedMetadata
"""]
retval = [1]