about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-28 20:26:52 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2024-01-28 20:26:52 +0000
commit28efa62ba175998cde7b922145e0b40e68a2674e (patch)
treed64401fe3f054f46ead216abb322f082928ddae5
parentf900db12f6cd4e361b37cf2c6739ac469b6fcafb (diff)
downloadnetpbm-mirror-28efa62ba175998cde7b922145e0b40e68a2674e.tar.gz
netpbm-mirror-28efa62ba175998cde7b922145e0b40e68a2674e.tar.xz
netpbm-mirror-28efa62ba175998cde7b922145e0b40e68a2674e.zip
Release 11.05.02
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4839 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/ppm/ppmtowinicon.c6
-rw-r--r--doc/HISTORY5
-rw-r--r--version.mk2
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