diff --git a/ChangeLog.txt b/ChangeLog.txt index 519e430e..9fcb2837 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -27,6 +27,8 @@ decompressor to output planar YUV images. [9] Added an extended version of tjDecompressHeader() to TurboJPEG/OSS which allows the caller to determine the type of subsampling used in a JPEG image. +[10] Added further protections against invalid Huffman codes. + Significant changes since 1.0.0 =============================== diff --git a/jdhuff.c b/jdhuff.c index ab8e2544..58e37795 100644 --- a/jdhuff.c +++ b/jdhuff.c @@ -660,7 +660,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 ]; \ } \ }