FLI tests for Oss-fuzz crash.

* Note, valgrind doesn't pick this up, it's only the oss-fuzz
  reproducer that catches it OMM.
This commit is contained in:
Eric Soroos 2021-08-08 14:04:05 +02:00 committed by Hugo van Kemenade
parent 94a0cf1b14
commit bd5cf7db87
2 changed files with 13 additions and 0 deletions

Binary file not shown.

View File

@ -138,3 +138,16 @@ def test_timeouts(test_file):
with Image.open(f) as im:
with pytest.raises(OSError):
im.load()
@pytest.mark.parametrize(
"test_file",
[
"Tests/images/crash-5762152299364352.fli",
],
)
def test_crash(test_file):
with open(test_file, "rb") as f:
with Image.open(f) as im:
with pytest.raises(OSError):
im.load()