From 124f4bb591e16212605d0e41c413ed53e242cba2 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Mon, 9 Mar 2020 20:21:40 +0000 Subject: [PATCH] Tests for PCX OOB Access --- Tests/images/01r_00.pcx | Bin 0 -> 836 bytes Tests/test_image.py | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 Tests/images/01r_00.pcx diff --git a/Tests/images/01r_00.pcx b/Tests/images/01r_00.pcx new file mode 100644 index 0000000000000000000000000000000000000000..f40777ac58221b95a071e47ac4cdf61eb58861a3 GIT binary patch literal 836 zcmd;LW#nK0f^Y_71_#CyAm)DMp5#gfsqF&z|#N{#S8x5LrB*X zFtQ$K$!UmHAp4jQI)RR11oFVH0NZSWkV9665QVd>;4B2=G(-8Bav&GsJ&1phOa&_@ z+Gsfx$096(vCu++9po7}_+JlaLK$r+0$|rFFq|%D0JF}N6T#{*2Ko@F?l#D$U>1sz zFitrbjjn|X Hc6S2+Q8W7n literal 0 HcmV?d00001 diff --git a/Tests/test_image.py b/Tests/test_image.py index b0fd7c540..6e9a5e883 100644 --- a/Tests/test_image.py +++ b/Tests/test_image.py @@ -638,6 +638,9 @@ class TestImage: assert test_module.PILLOW_VERSION > "7.0.0" def test_overrun(self): + """ For overrun completeness, test as: + `valgrind pytest -qq Tests/test_image.py::TestImage::test_overrun | grep decode.c` + """ for file in [ "fli_overrun.bin", "sgi_overrun.bin", @@ -645,6 +648,7 @@ class TestImage: "sgi_overrun_expandrow2.bin", "pcx_overrun.bin", "pcx_overrun2.bin", + "01r_00.pcx", ]: with Image.open(os.path.join("Tests/images", file)) as im: try: