diff --git a/Tests/images/crash-5762152299364352.fli b/Tests/images/crash-5762152299364352.fli new file mode 100644 index 00000000000..944fe0b56c7 Binary files /dev/null and b/Tests/images/crash-5762152299364352.fli differ diff --git a/Tests/test_file_fli.py b/Tests/test_file_fli.py index 1c1abf2b175..675e06bf83c 100644 --- a/Tests/test_file_fli.py +++ b/Tests/test_file_fli.py @@ -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()