diff vp6.c @ 9920:8332746a9db9 libavcodec

Add a check to vp6_parse_coeff_huffman to ensure it does not overread the input buffer.
author reimar
date Sun, 05 Jul 2009 16:01:51 +0000
parents 0dce4fe6e6f3
children 8d23ea397dda
line wrap: on
line diff
--- a/vp6.c	Sun Jul 05 15:23:42 2009 +0000
+++ b/vp6.c	Sun Jul 05 16:01:51 2009 +0000
@@ -372,6 +372,8 @@
                 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) {