about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/pbm/pbmtoxbm.c4
-rw-r--r--doc/HISTORY4
-rw-r--r--lib/libpbm2.c2
-rw-r--r--version.mk2
4 files changed, 10 insertions, 2 deletions
diff --git a/converter/pbm/pbmtoxbm.c b/converter/pbm/pbmtoxbm.c
index ecb72b30..1a003189 100644
--- a/converter/pbm/pbmtoxbm.c
+++ b/converter/pbm/pbmtoxbm.c
@@ -353,6 +353,10 @@ convertRaster(FILE *          const ifP,
     unsigned char * bitrow;
     unsigned int row;
 
+    if (cols > UINT_MAX - bitsPerUnit)
+        pm_error("Image is too wide (%u columns) for computations",
+                 cols);
+
     putinit(xbmVersion);
 
     bitrow = pbm_allocrow_packed(cols + padright);
diff --git a/doc/HISTORY b/doc/HISTORY
index dc7f78c4..ce7e957e 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -4,6 +4,10 @@ Netpbm.
 CHANGE HISTORY 
 --------------
 
+23.09.24 BJH  Release 11.03.06
+
+              pbmtoxbm: Fix spurious output with really wide rows.
+
 23.09.06 BJH  Release 11.03.05
 
               pamtosvg: fix hang.
diff --git a/lib/libpbm2.c b/lib/libpbm2.c
index 2a2e2aac..244d5835 100644
--- a/lib/libpbm2.c
+++ b/lib/libpbm2.c
@@ -53,7 +53,7 @@ pbm_readpbminitrest( FILE * const file,
     if (*colsP < 0)
         pm_error("Number of columns in header is too large.");
     if (*rowsP < 0)
-        pm_error("Number of columns in header is too large.");
+        pm_error("Number of rows in header is too large.");
 }
 
 
diff --git a/version.mk b/version.mk
index 0f13782a..54ae6917 100644
--- a/version.mk
+++ b/version.mk
@@ -1,3 +1,3 @@
 NETPBM_MAJOR_RELEASE = 11
 NETPBM_MINOR_RELEASE = 3
-NETPBM_POINT_RELEASE = 5
+NETPBM_POINT_RELEASE = 6