File: test_issue_ghsa_h9x9_4f77_336w.py

package info (click to toggle)
exiv2 0.28.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 109,208 kB
  • sloc: cpp: 77,571; python: 9,474; javascript: 237; makefile: 190; sh: 172; ansic: 51; sed: 16
file content (17 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, CopyTmpFiles, path, check_no_ASAN_UBSAN_errors

class Jp2ImageEncodeJp2HeaderOutOfBoundsRead2(metaclass=CaseMeta):
    """
    Regression test for the bug described in:
    https://github.com/Exiv2/exiv2/security/advisories/GHSA-h9x9-4f77-336w
    """
    url = "https://github.com/Exiv2/exiv2/security/advisories/GHSA-h9x9-4f77-336w"

    filename = path("$data_path/issue_ghsa_h9x9_4f77_336w_poc.exv")
    commands = ["$exiv2 -P t $filename"]
    retval = [0]

    compare_stdout = check_no_ASAN_UBSAN_errors
    compare_stderr = check_no_ASAN_UBSAN_errors