Avoid negative integer overflow when chunkLength == 0.

This fixes #789.
This commit is contained in:
Kevin Backhouse
2019-04-25 21:42:54 +01:00
committed by Luis Díaz Más
parent f05d100579
commit 8cd95e2218
3 changed files with 25 additions and 5 deletions
+20
View File
@@ -0,0 +1,20 @@
import system_tests
class SegvInPngImageReadMetadata(
metaclass=system_tests.CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/789
"""
url = "https://github.com/Exiv2/exiv2/issues/789"
filename = system_tests.path(
"$data_path/issue_789_poc1.png"
)
commands = ["$exiv2 $filename"]
stdout = [""]
stderr = [""]
retval = [1]
compare_stderr = system_tests.check_no_ASAN_UBSAN_errors