Skip to content

Commit

Permalink
FLI tests for Oss-fuzz crash.
Browse files Browse the repository at this point in the history
* Note, valgrind doesn't pick this up, it's only the oss-fuzz
  reproducer that catches it OMM.
  • Loading branch information
wiredfool authored and hugovk committed Sep 2, 2021
1 parent 94a0cf1 commit bd5cf7d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added Tests/images/crash-5762152299364352.fli
Binary file not shown.
13 changes: 13 additions & 0 deletions Tests/test_file_fli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit bd5cf7d

Please sign in to comment.