From 2b814cde29535ab356401e91c3edf7ca3dcddb49 Mon Sep 17 00:00:00 2001 From: John Bowler Date: Wed, 17 Jan 2024 14:29:05 -0800 Subject: [PATCH] Regression test for off-by-one palette check error This adds a file to regression-test the previously introduced off-by-one error in the check on read for a colormapped PNG with an out-of-range index (equal or greater than the length of the PLTE). Previous tests covered all cases except the 8-bit palette case; the "small" test file contains the "bad" entry at index 254, not 255 so it passes even if the final byte is not checked. The new file has the erroneous entry in the last byte. Signed-off-by: John Bowler --- contrib/testpngs/badpal/regression-palette-8.png | Bin 0 -> 1036 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 contrib/testpngs/badpal/regression-palette-8.png diff --git a/contrib/testpngs/badpal/regression-palette-8.png b/contrib/testpngs/badpal/regression-palette-8.png new file mode 100644 index 0000000000000000000000000000000000000000..6052cf745f6f49e5f8067c1bf0776e8bf680efe3 GIT binary patch literal 1036 zcmW+#QHxte6uwa?HM%-JwMZ#LA4Jv&)2%|;7sobBv!$+sE+G%AOtV>f7t^~#yv7*T zI=eB(5YwS7c%@+(WWhC{4$D65L%_j@rQ(AF&4aZdg-AJ1 z8A~Zm2}vqN_MptgUFQNThJ6P*uSd1IzRb3R&P;A5t>-^WuAX~l>)`3P)Kl+%`ufYO`A4U(=l|@t zqbvC@?tU`+U7Zad-52cc;a9hNhjFzL{rvuW-#*tod}z--cAtOq+ryvcZm+&{YV_;$ xmzfK5v)d28{^3Rc|IA|XjpftR)fzqXM-Xgn=W-`R{EiOO24d literal 0 HcmV?d00001