Pillow/Tests/check_j2k_overflow.py
Hugo van Kemenade 53c3cd9f8e isort Tests
2024-01-20 13:23:03 +02:00

13 lines
248 B
Python

from __future__ import annotations
import pytest
from PIL import Image
def test_j2k_overflow(tmp_path):
im = Image.new("RGBA", (1024, 131584))
target = str(tmp_path / "temp.jpc")
with pytest.raises(OSError):
im.save(target)