Merge pull request #1786 from Exiv2/mergify/bp/main/pr-1769
Safer std::vector indexing (backport #1769)main
commit
3575a8258e
@ -0,0 +1,3 @@
|
|||||||
|
<?xml <?xpacket
|
||||||
|
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
|
Binary file not shown.
@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
|
||||||
|
|
||||||
|
class coverage_xmpsidecar_isXmpType(metaclass=CaseMeta):
|
||||||
|
"""
|
||||||
|
Test added to improve code coverage in xmpsidecar.cpp after
|
||||||
|
Codecov complained about a lack of code coverage in this PR:
|
||||||
|
https://github.com/Exiv2/exiv2/pull/1786
|
||||||
|
"""
|
||||||
|
|
||||||
|
filename = path("$data_path/coverage_xmpsidecar_isXmpType.xmp")
|
||||||
|
commands = ["$exiv2 $filename"]
|
||||||
|
stderr = ["""Error: XMP Toolkit error 201: XML parsing failure
|
||||||
|
Warning: Failed to decode XMP metadata.
|
||||||
|
$filename: No Exif data found in the file
|
||||||
|
"""]
|
||||||
|
retval = [253]
|
||||||
|
|
||||||
|
compare_stdout = check_no_ASAN_UBSAN_errors
|
@ -0,0 +1,18 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from system_tests import CaseMeta, CopyTmpFiles, path, check_no_ASAN_UBSAN_errors
|
||||||
|
|
||||||
|
class Jp2ImageEncodeJp2HeaderOutOfBoundsRead2(metaclass=CaseMeta):
|
||||||
|
"""
|
||||||
|
Regression test for the bug described in:
|
||||||
|
https://github.com/Exiv2/exiv2/security/advisories/GHSA-v5g7-46xf-h728
|
||||||
|
"""
|
||||||
|
url = "https://github.com/Exiv2/exiv2/security/advisories/GHSA-v5g7-46xf-h728"
|
||||||
|
|
||||||
|
filename = path("$data_path/issue_ghsa_v5g7_46xf_h728_poc.exv")
|
||||||
|
commands = ["$exiv2 $filename"]
|
||||||
|
stdout = [""]
|
||||||
|
stderr = ["""Exiv2 exception in print action for file $filename:
|
||||||
|
Invalid XmpText type `'
|
||||||
|
"""]
|
||||||
|
retval = [1]
|
Loading…
Reference in New Issue