From 957187d417c55654d7c45ae5d0e48fbf4e67a9a1 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 2 Jan 2016 12:27:40 +1100 Subject: [PATCH] Added TIFF IFD test --- Tests/test_file_tiff.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 26b6bd4c3..a58d33809 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -107,6 +107,11 @@ class TestFileTiff(PillowTestCase): self.assertRaises(SyntaxError, lambda: TiffImagePlugin.TiffImageFile(invalid_file)) + TiffImagePlugin.PREFIXES.append("\xff\xd8\xff\xe0") + self.assertRaises(SyntaxError, + lambda: TiffImagePlugin.TiffImageFile(invalid_file)) + TiffImagePlugin.PREFIXES.pop() + def test_bad_exif(self): i = Image.open('Tests/images/hopper_bad_exif.jpg') try: