Blame tests/bugfixes/github/test_issue_791.py

Packit Service 21b5d1
import system_tests
Packit Service 21b5d1
Packit Service 21b5d1
Packit Service 21b5d1
class IntegerOverflowInWebpImageReadMetadata(
Packit Service 21b5d1
        metaclass=system_tests.CaseMeta):
Packit Service 21b5d1
    """
Packit Service 21b5d1
    Regression test for the bug described in:
Packit Service 21b5d1
    https://github.com/Exiv2/exiv2/issues/791
Packit Service 21b5d1
Packit Service 21b5d1
    Due to an integer overflow bug (#791), this test triggers a 4GB
Packit Service 21b5d1
    memory allocation. So the test will fail with a std::bad_alloc
Packit Service 21b5d1
    exception if less than 4GB is available.  On Linux, you can use
Packit Service 21b5d1
    `ulimit -v 4000000` to reduce the available memory to slightly
Packit Service 21b5d1
    less than 4GB.
Packit Service 21b5d1
    """
Packit Service 21b5d1
    url = "https://github.com/Exiv2/exiv2/issues/791"
Packit Service 21b5d1
Packit Service 21b5d1
    filename = system_tests.path(
Packit Service 21b5d1
        "$data_path/issue_791_poc1.webp"
Packit Service 21b5d1
    )
Packit Service 21b5d1
    commands = ["$exiv2 $filename"]
Packit Service 21b5d1
    stdout = [""]
Packit Service 21b5d1
    stderr = ["""Exiv2 exception in print action for file $filename:
Packit Service 21b5d1
$kerCorruptedMetadata
Packit Service 21b5d1
"""
Packit Service 21b5d1
]
Packit Service 21b5d1
    retval = [1]