diff options
Diffstat (limited to 'editor/pbmreduce.c')
-rw-r--r-- | editor/pbmreduce.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/pbmreduce.c b/editor/pbmreduce.c index f49c8d9a..ee4a4fbd 100644 --- a/editor/pbmreduce.c +++ b/editor/pbmreduce.c @@ -10,6 +10,7 @@ ** implied warranty. */ +#include <limits.h> #include "pbm.h" #include "mallocvar.h" @@ -70,6 +71,8 @@ main( argc, argv ) pm_usage( usage ); if ( n < 2 ) pm_error( "N must be greater than 1" ); + if (n > INT_MAX / n) + pm_error("Scale argument too large. You specified %d", n); ++argn; if ( argn == argc ) |