From 28efa62ba175998cde7b922145e0b40e68a2674e Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 28 Jan 2024 20:26:52 +0000 Subject: Release 11.05.02 git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4839 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/ppm/ppmtowinicon.c | 6 +++--- doc/HISTORY | 5 +++++ version.mk | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/converter/ppm/ppmtowinicon.c b/converter/ppm/ppmtowinicon.c index 0e2751f3..bd478b1e 100644 --- a/converter/ppm/ppmtowinicon.c +++ b/converter/ppm/ppmtowinicon.c @@ -395,9 +395,9 @@ newBitmap(unsigned int const bpp, unsigned int const rows, colorhash_table const cht) { - unsigned int const xByteCt = ROUNDUP(cols, 32)/8; - /* How wide the u1 string for each row should be -- Each byte is 8 - pixels, but must be a multiple of 4 bytes. + unsigned int const xByteCt = ROUNDUP(cols * bpp, 32)/8; + /* How wide the u1 string for each row should be. Pixels are packed + into bytes, padded to a multiple of 4 bytes. */ ICON_bmp * icBitmapP; /* malloc'ed */ u1 ** rowData; /* malloc'ed */ diff --git a/doc/HISTORY b/doc/HISTORY index d114dce8..d9a71114 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -4,6 +4,11 @@ Netpbm. CHANGE HISTORY -------------- +24.01.28 BJH Release 11.05.02 + + ppmtowinicon: fix array overrun with 4 and 8 bits per pixel. + Broken in Netpbm 11.05 (December 2023). + 23.12.28 BJH Release 11.05.01 Fix typo in ppmforge test case. diff --git a/version.mk b/version.mk index 8c950d02..bcedddf1 100644 --- a/version.mk +++ b/version.mk @@ -1,3 +1,3 @@ NETPBM_MAJOR_RELEASE = 11 NETPBM_MINOR_RELEASE = 5 -NETPBM_POINT_RELEASE = 1 +NETPBM_POINT_RELEASE = 2 -- cgit 1.4.1