Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download CVE images instead of storing them on disk #4792

Closed
wants to merge 1 commit into from
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)