diff --git a/Tests/oss-fuzz/fuzzers.py b/Tests/oss-fuzz/fuzzers.py index 0b9e30cb6ae..93947b9adef 100644 --- a/Tests/oss-fuzz/fuzzers.py +++ b/Tests/oss-fuzz/fuzzers.py @@ -21,6 +21,10 @@ def fuzz_image(data: bytes) -> None: # This will fail on some images in the corpus, as we have many # invalid images in the test suite. print("torch", ImageFile.LOAD_TRUNCATED_IMAGES) + if ImageFile.LOAD_TRUNCATED_IMAGES: + print("torchabort") + import sys + sys.exit() with Image.open(io.BytesIO(data)) as im: im.rotate(45) im.filter(ImageFilter.DETAIL)