Remove call to atol, which might read off the end of the buffer. (#870)

This commit is contained in:
Kevin Backhouse
2019-05-17 11:45:42 +01:00
committed by Luis Díaz Más
parent 9092b422e6
commit b35c43e7c2
4 changed files with 32 additions and 4 deletions
+1 -1
View File
@@ -18,6 +18,6 @@ class LargeAllocationInPngChunk(metaclass=CaseMeta):
stdout = [""]
stderr = [
"""$exiv2_exception_message $filename:
$kerCorruptedMetadata
Failed to read image data
"""]
retval = [1]
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class OutOfBoundsReadInIptcParserDecode(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/869
"""
url = "https://github.com/Exiv2/exiv2/issues/869"
filename = path("$data_path/issue_869_poc.png")
commands = ["$exiv2 $filename"]
stdout = [""]
stderr = [
"""Exiv2 exception in print action for file $filename:
Failed to read image data
"""
]
retval = [1]