Blame tests/bugfixes/github/test_issue_791.py

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