diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-09 18:21:17 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2007-12-09 18:21:17 +0000 |
commit | bce598c9d7969f0637ce2e7e3a5bc696ab04d2f5 (patch) | |
tree | 57b2148e0012ed11b19c23ecb059f8723974a25f | |
parent | d97e2f3a64b09a748bb0984fba33f3595298853a (diff) | |
download | netpbm-mirror-bce598c9d7969f0637ce2e7e3a5bc696ab04d2f5.tar.gz netpbm-mirror-bce598c9d7969f0637ce2e7e3a5bc696ab04d2f5.tar.xz netpbm-mirror-bce598c9d7969f0637ce2e7e3a5bc696ab04d2f5.zip |
properly check ridiculously large height, width
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@481 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r-- | generator/pbmmake.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/generator/pbmmake.c b/generator/pbmmake.c index afe1dac3..6c924ac1 100644 --- a/generator/pbmmake.c +++ b/generator/pbmmake.c @@ -75,16 +75,8 @@ parseCommandLine(int argc, char ** argv, "non-option arguments: width and height in pixels", argc-1); else { - cmdlineP->width = atoi(argv[1]); - cmdlineP->height = atoi(argv[2]); - - if (cmdlineP->width < 1) - pm_error("Width must be positive. You specified %d.", - cmdlineP->width); - - if (cmdlineP->height < 1) - pm_error("Height must be positive. You specified %d.", - cmdlineP->height); + cmdlineP->width = pm_parse_width(argv[1]); + cmdlineP->height = pm_parse_height(argv[2]); } } |