-
Notifications
You must be signed in to change notification settings - Fork 278
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 #1798 from Exiv2/mergify/bp/main/pr-1789
&bytes[0] (std::vector) will crash if bytes has zero elements (backport #1789)
- Loading branch information
Showing
3 changed files
with
34 additions
and
12 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from system_tests import CaseMeta, CopyTmpFiles, path, check_no_ASAN_UBSAN_errors | ||
import unittest | ||
|
||
@unittest.skip("Skipping test using option -pR (only for Debug mode)") | ||
class ImagePrintIFDStructureZeroCountAssert(metaclass=CaseMeta): | ||
""" | ||
Regression test for the bug described in: | ||
https://github.com/Exiv2/exiv2/security/advisories/GHSA-g44w-q3vm-gwjq | ||
""" | ||
url = "https://github.com/Exiv2/exiv2/security/advisories/GHSA-g44w-q3vm-gwjq" | ||
|
||
filename = path("$data_path/issue_ghsa_g44w_q3vm_gwjq_poc.jpg") | ||
commands = ["$exiv2 -pR $filename"] | ||
stderr = ["""invalid type in tiff structure0 | ||
Exiv2 exception in print action for file $filename: | ||
$kerInvalidTypeValue | ||
"""] | ||
retval = [1] | ||
|
||
compare_stdout = check_no_ASAN_UBSAN_errors |