Prevent SIGABRT on excessive subBox length in jp2image.cpp
This fixes CVE-2018-9145v0.27.3
parent
af44cec65f
commit
c03f73268f
Binary file not shown.
@ -0,0 +1,26 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
import system_tests
|
||||||
|
|
||||||
|
|
||||||
|
class SubBoxLengthDataBufAbort(metaclass=system_tests.CaseMeta):
|
||||||
|
|
||||||
|
url = "https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-9145"
|
||||||
|
|
||||||
|
filename = system_tests.path(
|
||||||
|
"$data_path/4-DataBuf-abort-1"
|
||||||
|
)
|
||||||
|
commands = ["$exiv2 -pR $filename"]
|
||||||
|
stdout = [
|
||||||
|
"""STRUCTURE OF JPEG2000 FILE: $filename
|
||||||
|
address | length | box | data
|
||||||
|
0 | 12 | jP |
|
||||||
|
12 | 20 | jp2h |
|
||||||
|
"""
|
||||||
|
]
|
||||||
|
stderr = [
|
||||||
|
"""$exiv2_exception_message $filename:
|
||||||
|
$kerCorruptedMetadata
|
||||||
|
"""
|
||||||
|
]
|
||||||
|
retval = [1]
|
Loading…
Reference in New Issue