From 2d6b66ef41fcef629ce06c0f37a4855581d8d45b Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Tue, 16 Apr 2013 11:59:51 -0400 Subject: GRAPHICS: Fix quantization table id check --- graphics/decoders/jpeg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/decoders') 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; } -- cgit v1.2.3