diff options
-rw-r--r-- | converter/ppm/ppmtowinicon.c | 6 | ||||
-rw-r--r-- | doc/HISTORY | 5 | ||||
-rw-r--r-- | 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 |