aboutsummaryrefslogtreecommitdiff
path: root/graphics/decoders
diff options
context:
space:
mode:
authorMatthew Hoops2013-04-16 11:59:51 -0400
committerMatthew Hoops2013-04-16 12:00:39 -0400
commit2d6b66ef41fcef629ce06c0f37a4855581d8d45b (patch)
treebcb6406d262d3b3b0f976ceb396ba9782537a5af /graphics/decoders
parent8a50d8744570e7a426c76cd0ed00c5db671fd366 (diff)
downloadscummvm-rg350-2d6b66ef41fcef629ce06c0f37a4855581d8d45b.tar.gz
scummvm-rg350-2d6b66ef41fcef629ce06c0f37a4855581d8d45b.tar.bz2
scummvm-rg350-2d6b66ef41fcef629ce06c0f37a4855581d8d45b.zip
GRAPHICS: Fix quantization table id check
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;
}