From 5795ec2f24a21b29bc5e05a938973dc949fd8598 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 16 Jul 2020 19:06:46 +1000 Subject: [PATCH] Download CVE images instead of storing them on disk --- Tests/check_tiff_crashes.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Tests/check_tiff_crashes.py b/Tests/check_tiff_crashes.py index f4eb04375..8b659ea2d 100644 --- a/Tests/check_tiff_crashes.py +++ b/Tests/check_tiff_crashes.py @@ -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)