diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-01-27 02:31:31 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2022-01-27 02:31:31 +0000 |
commit | bbdc82b670a6f5b9a2581c3227607737e166a201 (patch) | |
tree | 6d7eaa4aac55dec86c21888bd930e0d5a7dca667 | |
parent | ccd8a4b94720b1d284a26cde78b6441f64f22ad9 (diff) | |
download | netpbm-mirror-bbdc82b670a6f5b9a2581c3227607737e166a201.tar.gz netpbm-mirror-bbdc82b670a6f5b9a2581c3227607737e166a201.tar.xz netpbm-mirror-bbdc82b670a6f5b9a2581c3227607737e166a201.zip |
Limit width to 255
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4262 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/ppm/ppmtoapplevol.c | 4 | ||||
-rw-r--r-- | doc/HISTORY | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/converter/ppm/ppmtoapplevol.c b/converter/ppm/ppmtoapplevol.c index d7050893..1e979de9 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); diff --git a/doc/HISTORY b/doc/HISTORY index cdfa514b..e1d1c74f 100644 --- a/doc/HISTORY +++ b/doc/HISTORY @@ -18,6 +18,10 @@ not yet BJH Release 10.98.00 specify the input file argument. Always broken. (ppmtoapplevol was new in Netpbm 10.54 (March 2011). + ppmtoapplevol: Fix bug: produces garbage with input image wider + than 255. Always broken. (ppmtoapplevol was new in Netpbm + 10.54 (March 2011). + pgmmedian: fix crash when median matrix is wider or higher than the input image. |