Skip to content

Commit

Permalink
Regression test for Exiv2#1817
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Jul 31, 2021
1 parent c6f7e48 commit 046dc03
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
Binary file added test/data/issue_1817_poc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions tests/bugfixes/github/test_issue_1817.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, path

class MemoryLeakInPngImagePrintStructure(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/1817
Note: the test only fails in an ASAN build.
"""
url = "https://github.com/Exiv2/exiv2/issues/1817"

filename = path("$data_path/issue_1817_poc.png")
commands = ["$exiv2 -pS $filename"]
stdout = ["""STRUCTURE OF PNG FILE: $filename
address | chunk | length | data | checksum
8 | eXIf | 0 | | 0x00000000
"""]
stderr = ["""$exiv2_exception_message $filename:
$kerCorruptedMetadata
"""]
retval = [1]

0 comments on commit 046dc03

Please sign in to comment.