[FFmpeg-cvslog] r19349 - trunk/libavcodec/vp6.c

reimar subversion
Sun Jul 5 18:01:51 CEST 2009


Author: reimar
Date: Sun Jul  5 18:01:51 2009
New Revision: 19349

Log:
Add a check to vp6_parse_coeff_huffman to ensure it does not overread the input buffer.

Modified:
   trunk/libavcodec/vp6.c

Modified: trunk/libavcodec/vp6.c
==============================================================================
--- trunk/libavcodec/vp6.c	Sun Jul  5 17:23:42 2009	(r19348)
+++ trunk/libavcodec/vp6.c	Sun Jul  5 18:01:51 2009	(r19349)
@@ -372,6 +372,8 @@ static void vp6_parse_coeff_huffman(VP56
                 if (coeff_idx)
                     break;
             } else {
+                if (get_bits_count(&s->gb) >= s->gb.size_in_bits)
+                    return;
                 coeff = get_vlc2(&s->gb, vlc_coeff->table, 9, 3);
                 if (coeff == 0) {
                     if (coeff_idx) {



More information about the ffmpeg-cvslog mailing list