about summary refs log tree commit diff
path: root/converter/ppm/ppmtoapplevol.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-27 02:36:15 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-01-27 02:36:15 +0000
commit074b331756e2dcd520e821db3fd7789926b9ccd9 (patch)
treecd59ca77ea288c69139a77d418b71be3b3d249db /converter/ppm/ppmtoapplevol.c
parent7363c9a203f82c172be2a06356eb8a2bdf0833a4 (diff)
downloadnetpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.tar.gz
netpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.tar.xz
netpbm-mirror-074b331756e2dcd520e821db3fd7789926b9ccd9.zip
Release 10.97.03
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4263 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/ppmtoapplevol.c')
-rw-r--r--converter/ppm/ppmtoapplevol.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/converter/ppm/ppmtoapplevol.c b/converter/ppm/ppmtoapplevol.c
index e1c7f2dc..eb4b6b2a 100644
--- a/converter/ppm/ppmtoapplevol.c
+++ b/converter/ppm/ppmtoapplevol.c
@@ -68,6 +68,10 @@ main (int argc, const char * argv[]) {
     if (rows != 12)
         pm_error("Input image must be 12 rows tall.  Yours is %u", rows);
 
+    if (cols > 255)
+        pm_error("Input image must not be more than 255 columns wide."
+                 "  Yours is %u", cols);
+
     writeHeader(cols, stdout);
 
     pixelrow = ppm_allocrow(cols);
@@ -75,7 +79,7 @@ main (int argc, const char * argv[]) {
     for (row = 0; row < rows; row++) {
         unsigned int col;
         
-        ppm_readppmrow(stdin, pixelrow, cols, maxval, format);
+        ppm_readppmrow(ifP, pixelrow, cols, maxval, format);
 
         for (col = 0; col < cols; ++col) {
             unsigned int const maxval15Value =