mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 01:16:16 +03:00
Tests for SGI Overruns
This commit is contained in:
parent
394d6a180a
commit
dd341f12d6
BIN
Tests/images/sgi_crash.bin
Normal file
BIN
Tests/images/sgi_crash.bin
Normal file
Binary file not shown.
BIN
Tests/images/sgi_overrun_expandrowF04.bin
Normal file
BIN
Tests/images/sgi_overrun_expandrowF04.bin
Normal file
Binary file not shown.
15
Tests/test_sgi_crash.py
Normal file
15
Tests/test_sgi_crash.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
from .helper import PillowTestCase
|
||||||
|
from PIL import Image
|
||||||
|
|
||||||
|
repro = ('Tests/images/sgi_overrun_expandrowF04.bin',
|
||||||
|
'Tests/images/sgi_crash.bin',
|
||||||
|
)
|
||||||
|
|
||||||
|
class TestSgiCrashes(PillowTestCase):
|
||||||
|
def test_crashes(self):
|
||||||
|
for path in repro:
|
||||||
|
with open(path, 'rb') as f:
|
||||||
|
im = Image.open(f)
|
||||||
|
with self.assertRaises(IOError):
|
||||||
|
im.load()
|
Loading…
Reference in New Issue
Block a user