exiv2/tests/bugfixes/github/test_CVE_2018_10999.py
Luis Diaz Mas 2fb00c8a16 Analyze minimum needed number of null separators in PngChunk::parseTXTChunk
This commit fixes the heap-buffer-overflow in PngChunk::parseTXTChunk.

According to the specification:
http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html

There must be 2 null separators when we start to analyze the language tag.
2018-05-23 10:57:13 +02:00

18 lines
368 B
Python

# -*- coding: utf-8 -*-
import system_tests
class TestCvePoC(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/306"
filename = "$data_path/pocIssue306"
commands = ["$exiv2 -et " + filename]
retval = [1]
stdout = [""]
stderr = [
"""$exception_in_extract """ + filename + """:
$kerCorruptedMetadata
"""]