-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1786 from Exiv2/mergify/bp/main/pr-1769
Safer std::vector indexing (backport #1769)
- Loading branch information
Showing
19 changed files
with
84 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml <?xpacket | ||
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | ||
|
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
tests/bugfixes/github/test_coverage_xmpsidecar_isXmpType.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] |