Merge pull request #1849 from Exiv2/mergify/bp/main/pr-1848
Replace assertion with an error message (backport #1848)
This commit is contained in:
commit
a1b65a7928
@ -1545,7 +1545,11 @@ namespace Exiv2 {
|
||||
for (auto&& component : components_) {
|
||||
if (component->tag() == 0x014a) {
|
||||
// Hack: delay writing of sub-IFD image data to get the order correct
|
||||
assert(pSubIfd == 0);
|
||||
#ifndef SUPPRESS_WARNINGS
|
||||
if (pSubIfd != 0) {
|
||||
EXV_ERROR << "Multiple sub-IFD image data tags found\n";
|
||||
}
|
||||
#endif
|
||||
pSubIfd = component;
|
||||
continue;
|
||||
}
|
||||
|
||||
BIN
test/data/issue_1847_poc.jpg
Normal file
BIN
test/data/issue_1847_poc.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
17
tests/bugfixes/github/test_issue_1847.py
Normal file
17
tests/bugfixes/github/test_issue_1847.py
Normal file
@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors
|
||||
|
||||
class TiffMnEntryDoCountInvalidTiffType(metaclass=CaseMeta):
|
||||
"""
|
||||
Test for the bug described in:
|
||||
https://github.com/Exiv2/exiv2/issues/1847
|
||||
"""
|
||||
url = "https://github.com/Exiv2/exiv2/issues/1847"
|
||||
|
||||
filename = path("$data_path/issue_1847_poc.jpg")
|
||||
commands = ["$exiv2 -pS $filename"]
|
||||
stderr = [""]
|
||||
retval = [0]
|
||||
|
||||
compare_stdout = check_no_ASAN_UBSAN_errors
|
||||
Loading…
Reference in New Issue
Block a user