mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-22 21:24:46 +03:00
Download CVE images instead of storing them on disk
This commit is contained in:
parent
74c8072945
commit
5795ec2f24
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user