changeset 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 c7c1c6b35a73
children f42402d1778b
files vp6.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
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) {