-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4504 from hugovk/sgi_fixes
Fix buffer overflow in SGI-RLE decoding
- Loading branch information
Showing
4 changed files
with
20 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python | ||
import pytest | ||
from PIL import Image | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"test_file", | ||
["Tests/images/sgi_overrun_expandrowF04.bin", "Tests/images/sgi_crash.bin"], | ||
) | ||
def test_crashes(test_file): | ||
with open(test_file, "rb") as f: | ||
im = Image.open(f) | ||
with pytest.raises(IOError): | ||
im.load() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters