Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions Tests/check_tiff_crashes.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@
# version.


import urllib.request

from PIL import Image

repro_read_strip = (
"images/crash_1.tif",
"images/crash_2.tif",
"crash_1.tif",
"crash_2.tif",
)

for path in repro_read_strip:
with Image.open(path) as im:
try:
im.load()
except Exception as msg:
print(msg)
repo = "https://raw.githubusercontent.com/python-pillow/Pillow/master/"
with urllib.request.urlopen(repo + "Tests/images/" + path) as f:
with Image.open(f) as im:
try:
im.load()
except Exception as msg:
print(msg)