From 6ed99fb6d064be14ce3f1fda2937c7b8033371d8 Mon Sep 17 00:00:00 2001 From: DRC Date: Tue, 4 Jan 2011 19:14:44 +0000 Subject: [PATCH] Further protect against bad Huffman codes git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4231 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- common/jpeg/jdhuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/jpeg/jdhuff.c b/common/jpeg/jdhuff.c index 04b38d5d..0291bc97 100644 --- a/common/jpeg/jdhuff.c +++ b/common/jpeg/jdhuff.c @@ -658,7 +658,7 @@ decode_mcu_slow (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) symbol |= GET_BITS(1); \ size++; \ } \ - symbol = htbl->pub->huffval[ (int) (symbol + htbl->valoffset[size]) ]; \ + symbol = htbl->pub->huffval[ (int) (symbol + htbl->valoffset[size]) & 0xFF ]; \ } \ } -- 2.39.5