Download CVE images instead of storing them on disk

This commit is contained in:
Andrew Murray 2020-07-16 19:06:46 +10:00
parent 74c8072945
commit 5795ec2f24

View File

@ -14,15 +14,19 @@
# 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:
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: