GRAPHICS: Fix quantization table id check
This commit is contained in:
parent
8a50d87445
commit
2d6b66ef41
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue