diff options
Diffstat (limited to 'plugins/AdvaImg/src/LibJPEG/rdswitch.c')
-rw-r--r-- | plugins/AdvaImg/src/LibJPEG/rdswitch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/AdvaImg/src/LibJPEG/rdswitch.c b/plugins/AdvaImg/src/LibJPEG/rdswitch.c index 5eebcc1e5c..05753a3020 100644 --- a/plugins/AdvaImg/src/LibJPEG/rdswitch.c +++ b/plugins/AdvaImg/src/LibJPEG/rdswitch.c @@ -2,6 +2,7 @@ * rdswitch.c
*
* Copyright (C) 1991-1996, Thomas G. Lane.
+ * Modified 2003-2015 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -347,8 +348,9 @@ set_sample_factors (j_compress_ptr cinfo, char *arg) return FALSE;
if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */
return FALSE;
- if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) {
- fprintf(stderr, "JPEG sampling factors must be 1..4\n");
+ if (val1 <= 0 || val1 > MAX_SAMP_FACTOR ||
+ val2 <= 0 || val2 > MAX_SAMP_FACTOR) {
+ fprintf(stderr, "JPEG sampling factors must be 1..%d\n", MAX_SAMP_FACTOR);
return FALSE;
}
cinfo->comp_info[ci].h_samp_factor = val1;
|