GRAPHICS: Fix quantization table id check

This commit is contained in:
Matthew Hoops 2013-04-16 11:59:51 -04:00
parent 8a50d87445
commit 2d6b66ef41

View File

@ -487,8 +487,8 @@ bool JPEGDecoder::readDQT() {
// Validate the table id
tableId &= 0xF;
if (tableId > JPEG_MAX_QUANT_TABLES) {
warning("JPEG: Invalid number of components");
if (tableId >= JPEG_MAX_QUANT_TABLES) {
warning("JPEG: Invalid quantization table");
return false;
}