diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-01 22:44:43 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-10-01 22:44:43 +0000 |
commit | af3dcc0ee624844977516a01aaf663b6922b2fe8 (patch) | |
tree | 61ac08e0702f25f59100154268e4aff06ffd838a | |
parent | 52ccc939ebc933f09fe7e4c2121dddaee49ab0ed (diff) | |
download | netpbm-mirror-af3dcc0ee624844977516a01aaf663b6922b2fe8.tar.gz netpbm-mirror-af3dcc0ee624844977516a01aaf663b6922b2fe8.tar.xz netpbm-mirror-af3dcc0ee624844977516a01aaf663b6922b2fe8.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4714 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | converter/ppm/ppmtopj.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/converter/ppm/ppmtopj.c b/converter/ppm/ppmtopj.c index cf808c42..8fe6c05d 100644 --- a/converter/ppm/ppmtopj.c +++ b/converter/ppm/ppmtopj.c @@ -199,6 +199,10 @@ main(int argc, const char ** argv) { pm_close(ifP); MALLOCARRAY_NOFAIL(obuf, cols); + + if (cols > UINT_MAX / 2) + pm_error("Image too wide (%u columns) for computation", cols); + MALLOCARRAY_NOFAIL(cbuf, cols * 2); if (cols > XPIX || rows > YPIX) |