Skip to content

Commit bd5cf7d

Browse files
wiredfoolhugovk
authored andcommitted
FLI tests for Oss-fuzz crash.
* Note, valgrind doesn't pick this up, it's only the oss-fuzz reproducer that catches it OMM.
1 parent 94a0cf1 commit bd5cf7d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
8.53 KB
Binary file not shown.

Tests/test_file_fli.py

+13
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,16 @@ def test_timeouts(test_file):
138138
with Image.open(f) as im:
139139
with pytest.raises(OSError):
140140
im.load()
141+
142+
143+
@pytest.mark.parametrize(
144+
"test_file",
145+
[
146+
"Tests/images/crash-5762152299364352.fli",
147+
],
148+
)
149+
def test_crash(test_file):
150+
with open(test_file, "rb") as f:
151+
with Image.open(f) as im:
152+
with pytest.raises(OSError):
153+
im.load()

0 commit comments

Comments
 (0)