]> granicus.if.org Git - libjpeg-turbo/commitdiff
Further protect against invalid Huffman codes
authorDRC <dcommander@users.sourceforge.net>
Wed, 26 Jan 2011 05:35:20 +0000 (05:35 +0000)
committerDRC <dcommander@users.sourceforge.net>
Wed, 26 Jan 2011 05:35:20 +0000 (05:35 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.0.x@324 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
jdhuff.c

index c8d48ab21d5d99825e1a03c52d9cad54441743e4..5f6d331c05bf003e4900eff485edd86b93e93f9f 100644 (file)
@@ -1,3 +1,9 @@
+Significant changes since 1.0.1
+===============================
+
+[1] Added further protections against invalid Huffman codes.
+
+
 Significant changes since 1.0.0
 ===============================
 
index 04b38d5d462cd3ce751b97e8b32c6450fe10eeb7..0291bc9797f1056db1cf8ddbe772604124cc92db 100644 (file)
--- 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 ]; \
   } \
 }