mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-10 07:14:46 +03:00
Fail on invalid EXIF, reverting ed2cca1
.
This commit is contained in:
parent
752d46324c
commit
5b348bb695
|
@ -84,10 +84,8 @@ class TestFileTiff(PillowTestCase):
|
||||||
self.assertEqual(im.info['dpi'], (72., 72.))
|
self.assertEqual(im.info['dpi'], (72., 72.))
|
||||||
|
|
||||||
def test_bad_exif(self):
|
def test_bad_exif(self):
|
||||||
try:
|
image = Image.open('Tests/images/hopper_bad_exif.jpg')
|
||||||
Image.open('Tests/images/hopper_bad_exif.jpg')._getexif()
|
self.assertRaises(Exception, image._getexif)
|
||||||
except struct.error:
|
|
||||||
self.fail("Bad EXIF data should not pass incorrect values to _binary unpack")
|
|
||||||
|
|
||||||
def test_little_endian(self):
|
def test_little_endian(self):
|
||||||
im = Image.open('Tests/images/16bit.cropped.tif')
|
im = Image.open('Tests/images/16bit.cropped.tif')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user