diff --git a/ppd/pdftops.c b/ppd/pdftops.c index d1ad2efd..0bb31c53 100644 --- a/ppd/pdftops.c +++ b/ppd/pdftops.c @@ -1020,7 +1020,7 @@ ppdFilterPDFToPS(int inputfd, // I - File descriptor input stream if ((val = cupsGetOption("pdftops-max-image-resolution", num_options, options)) != NULL) { - if ((numvalues = sscanf(val, "%d", &mres)) > 0) + if ((numvalues = sscanf(val, "%d", &mres)) > 0 && mres >= 0) maxres = mres; else if (log) log(ld, CF_LOGLEVEL_WARN,