Avoid integer overflow.

This commit is contained in:
Kevin Backhouse
2019-05-13 16:56:29 +01:00
committed by Luis Díaz Más
parent f4a37c63f2
commit c0ecc2ae36
3 changed files with 24 additions and 2 deletions
+22
View File
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class IntegerOverflowInCiffDirectoryReadDirectory(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/843
An integer overflow causes an out-of-bounds read.
"""
url = "https://github.com/Exiv2/exiv2/issues/843"
filename = path("$data_path/issue_843_poc.crw")
commands = ["$exiv2 $filename"]
stdout = [""]
stderr = [
"""$exiv2_exception_message $filename:
$kerCorruptedMetadata
"""]
retval = [1]