diff --git a/picojpeg.c b/picojpeg.c index 2fae2a9..6cba8a5 100644 --- a/picojpeg.c +++ b/picojpeg.c @@ -642,8 +642,9 @@ static uint8 readSOFMarker(void) gCompVSamp[i] = (uint8)getBits1(4); gCompQuant[i] = (uint8)getBits1(8); - if (gCompQuant[i] > 1) + if (i < 2 && gCompQuant[i] > 1) { return PJPG_UNSUPPORTED_QUANT_TABLE; + } } return 0;