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-03-27 03:11:13 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-03-27 03:11:13 +0000
commit6f9d75acb45235a93b1520beec7f96a98bde0412 (patch)
tree903719a5984cd8008cdd079af7a445de271c23e4 /converter/ppm/ppmtoapplevol.c
parente15e137ba527ba97c82149ad8c6bed59088d8616 (diff)
downloadnetpbm-mirror-6f9d75acb45235a93b1520beec7f96a98bde0412.tar.gz
netpbm-mirror-6f9d75acb45235a93b1520beec7f96a98bde0412.tar.xz
netpbm-mirror-6f9d75acb45235a93b1520beec7f96a98bde0412.zip
Release 10.73.39
git-svn-id: http://svn.code.sf.net/p/netpbm/code/super_stable@4314 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 =