From fb862c019bfe18cedf9dcc6a6bba1c963b1e8cef Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 23 Aug 2026 09:30:28 +0530 Subject: [PATCH] ... --- kitty_tests/graphics.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kitty_tests/graphics.py b/kitty_tests/graphics.py index deaac98ed..d58d53b0f 100644 --- a/kitty_tests/graphics.py +++ b/kitty_tests/graphics.py @@ -511,6 +511,8 @@ class TestGraphics(BaseTest): # a 25-byte chunk previously caused a crash. res = pl(b'x' * 25, f=100) self.ae(res.partition(':')[0], 'EBADPNG') + if Image is None: + return # Test that a truncated PNG (valid header + IHDR declaring more rows # than the IDAT data can produce, with no trailing chunks) is rejected # cleanly instead of causing libpng to parse uninitialized memory. The