Blame tests/bugfixes/github/test_CVE_2017_14858.py

Packit Service 21b5d1
# -*- coding: utf-8 -*-
Packit Service 21b5d1
Packit Service 21b5d1
import system_tests
Packit Service 21b5d1
Packit Service 21b5d1
Packit Service 21b5d1
class TestCvePoC(metaclass=system_tests.CaseMeta):
Packit Service 21b5d1
Packit Service 21b5d1
    url = "https://github.com/Exiv2/exiv2/issues/138"
Packit Service 21b5d1
Packit Service 21b5d1
    filename = "$data_path/007-heap-buffer-over"
Packit Service 21b5d1
    commands = ["$exiv2 $filename"]
Packit Service 21b5d1
    stdout = [
Packit Service 21b5d1
        """File name       : $filename
Packit Service 21b5d1
File size       : 331696 Bytes
Packit Service 21b5d1
MIME type       : image/tiff
Packit Service 21b5d1
Image size      : 0 x 12336
Packit Service 21b5d1
Camera make     : 000?0
Packit Service 21b5d1
Camera model    : 0000000000000
Packit Service 21b5d1
Image timestamp : 
Packit Service 21b5d1
Image number    : 
Packit Service 21b5d1
Exposure time   : 
Packit Service 21b5d1
Aperture        : 
Packit Service 21b5d1
Exposure bias   : 
Packit Service 21b5d1
Flash           : 
Packit Service 21b5d1
Flash bias      : 
Packit Service 21b5d1
Focal length    : 
Packit Service 21b5d1
Subject distance: 
Packit Service 21b5d1
ISO speed       : 
Packit Service 21b5d1
Exposure mode   : 
Packit Service 21b5d1
Metering mode   : 
Packit Service 21b5d1
Macro mode      : 
Packit Service 21b5d1
Image quality   : 
Packit Service 21b5d1
Exif Resolution : 
Packit Service 21b5d1
White balance   : 
Packit Service 21b5d1
Thumbnail       : None
Packit Service 21b5d1
Copyright       : 
Packit Service 21b5d1
Exif comment    : 
Packit Service 21b5d1
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    stderr = [
Packit Service 21b5d1
        """Error: Offset of directory Image, entry 0x0100 is out of bounds: Offset = 0x30303030; truncating the entry
Packit Service 21b5d1
Warning: Directory Image, entry 0x0111: Strip 17 is outside of the data area; ignored.
Packit Service 21b5d1
Error: Directory Photo with 8224 entries considered invalid; not read.
Packit Service 21b5d1
Warning: Removing 913 characters from the beginning of the XMP packet
Packit Service 21b5d1
Error: XMP Toolkit error 201: XML parsing failure
Packit Service 21b5d1
Warning: Failed to decode XMP metadata.
Packit Service 21b5d1
"""
Packit Service 21b5d1
    ]
Packit Service 21b5d1
    retval = [0]