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 /converter/ppm | |
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
Diffstat (limited to 'converter/ppm')
-rw-r--r-- | converter/ppm/ppmtoapplevol.c | 4 |
1 files changed, 4 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); |