mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-09-21 11:28:58 +03:00
22e9bee4ef
* PSDImagePlugin did not sanity check the number of input layers and vs the size of the data block, this could lead to a DOS on Image.open prior to Image.load. * This issue dates to the PIL fork
20 lines
569 B
Python
20 lines
569 B
Python
from PIL import Image
|
|
import pytest
|
|
|
|
from .helper import assert_image_equal_tofile
|
|
|
|
|
|
def test_load_blp2_raw():
|
|
with Image.open("Tests/images/blp/blp2_raw.blp") as im:
|
|
assert_image_equal_tofile(im, "Tests/images/blp/blp2_raw.png")
|
|
|
|
|
|
def test_load_blp2_dxt1():
|
|
with Image.open("Tests/images/blp/blp2_dxt1.blp") as im:
|
|
assert_image_equal_tofile(im, "Tests/images/blp/blp2_dxt1.png")
|
|
|
|
|
|
def test_load_blp2_dxt1a():
|
|
with Image.open("Tests/images/blp/blp2_dxt1a.blp") as im:
|
|
assert_image_equal_tofile(im, "Tests/images/blp/blp2_dxt1a.png")
|