forked from Exiv2/exiv2
-
Notifications
You must be signed in to change notification settings - Fork 2
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 Exiv2#1767 from kevinbackhouse/fix-issue-1763
Fix null iterator deref in printCsLensTypeByMetadata
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 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
Binary file not shown.
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 | ||
|
||
class CanonPrintCsLensTypeByMetadataNullIteratorDeref(metaclass=CaseMeta): | ||
""" | ||
Regression test for the bug described in: | ||
https://github.com/Exiv2/exiv2/issues/1763 | ||
""" | ||
url = "https://github.com/Exiv2/exiv2/issues/1763" | ||
|
||
filename = path("$data_path/issue_1763_poc.exv") | ||
commands = ["$exiv2 -Pt $filename"] | ||
|
||
stderr = [""] | ||
retval = [0] | ||
|
||
def compare_stdout(self, i, command, got_stdout, expected_stdout): | ||
# Check that it printed "Bad value" for the date. | ||
self.assertIn("Unknown Lens (254)", got_stdout) |