Skip to content

Commit

Permalink
Regression test for GHSA-8949-hhfh-j7rj
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse authored and piponazo committed Apr 22, 2021
1 parent b3de96f commit c372f26
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Binary file added test/data/issue_ghsa_8949_hhfh_j7rj_poc.exv
Binary file not shown.
Binary file added test/data/issue_ghsa_8949_hhfh_j7rj_poc.jp2
Binary file not shown.
22 changes: 22 additions & 0 deletions tests/bugfixes/github/test_issue_ghsa_8949_hhfh_j7rj.py
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, path


class Jp2ImageEncodeJp2HeaderOutOfBoundsRead(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/security/advisories/GHSA-8949-hhfh-j7rj
"""
url = "https://github.com/Exiv2/exiv2/security/advisories/GHSA-8949-hhfh-j7rj"

filename1 = path("$data_path/issue_ghsa_8949_hhfh_j7rj_poc.jp2")
filename2 = path("$data_path/issue_ghsa_8949_hhfh_j7rj_poc.exv")
commands = ["$exiv2 in $filename1"]
stdout = [""]
stderr = [
"""Error: XMP Toolkit error 201: XML parsing failure
Warning: Failed to decode XMP metadata.
$filename1: Could not write metadata to file: $kerCorruptedMetadata
"""]
retval = [1]

0 comments on commit c372f26

Please sign in to comment.