diff options
author | 2017-01-26 19:55:37 +0100 | |
---|---|---|
committer | 2017-01-26 19:55:37 +0100 | |
commit | f603c763fe35a81bd3a7f41ab8a53c61c953e2cb (patch) | |
tree | 26b3659573426ea0111c3d5203b3eea78e508357 /3rdparty/libjpeg/rdswitch.c | |
parent | 4e5f922341d962577d19a62ee4ed21c7de1fc8f0 (diff) | |
parent | 4ba1c0f2cad36dc23613e0dec24e7e439d3e80fd (diff) |
Merge branch 'master' of https://github.com/mamedev/mame
Diffstat (limited to '3rdparty/libjpeg/rdswitch.c')
-rw-r--r-- | 3rdparty/libjpeg/rdswitch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/3rdparty/libjpeg/rdswitch.c b/3rdparty/libjpeg/rdswitch.c index 7a839af7a4f..b5aba83cb8a 100644 --- a/3rdparty/libjpeg/rdswitch.c +++ b/3rdparty/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; |