aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/decoders')
-rw-r--r--graphics/decoders/jpeg.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/graphics/decoders/jpeg.cpp b/graphics/decoders/jpeg.cpp
index 8adbab133f..75fdcd6e5a 100644
--- a/graphics/decoders/jpeg.cpp
+++ b/graphics/decoders/jpeg.cpp
@@ -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;
}