From: DRC Date: Wed, 26 Jan 2011 05:35:20 +0000 (+0000) Subject: Further protect against invalid Huffman codes X-Git-Tag: 1.1.0~46^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa1d18385d904d530b4aec83ab7757a33397de6e;p=libjpeg-turbo Further protect against invalid Huffman codes git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@324 632fc199-4ca6-4c93-a231-07263d6284db --- diff --git a/ChangeLog.txt b/ChangeLog.txt index c8d48ab..5f6d331 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,9 @@ +Significant changes since 1.0.1 +=============================== + +[1] Added further protections against invalid Huffman codes. + + Significant changes since 1.0.0 =============================== diff --git a/jdhuff.c b/jdhuff.c index 04b38d5..0291bc9 100644 --- a/jdhuff.c +++ b/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 ]; \ } \ }