File: test_CVE_2017_11338.py

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

import system_tests


class TestCvePoC(metaclass=system_tests.CaseMeta):

    url = "https://github.com/Exiv2/exiv2/issues/51"

    filename = "$data_path/POC4"
    commands = ["$exiv2 $filename"]
    stdout = [
        """File name       : $filename
File size       : 35 Bytes
MIME type       : image/x-panasonic-rw2
Image size      : 0 x 0
"""
    ]
    stderr = [
        """Warning: Directory PanasonicRaw has an unexpected next pointer; ignored.
Error: Directory PanasonicRaw, entry 0x002e has invalid size 4294967295*1; skipping entry.
$filename: No Exif data found in the file
"""
    ]
    retval = ["$no_exif_data_found_retval"]