[libav-devel] [PATCH 2/5] vp6: Fix illegal read.

Alex Converse alex.converse at gmail.com
Fri Nov 4 00:03:23 CET 2011


---
 libavcodec/vp6.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index e29f901..698b396 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -413,8 +413,10 @@ static void vp6_parse_coeff_huffman(VP56Context *s)
                 }
             }
             coeff_idx+=run;
-            cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);
-            vlc_coeff = &s->ract_vlc[pt][ct][cg];
+            if (coeff_idx < 64) {
+                cg = FFMIN(vp6_coeff_groups[coeff_idx], 3);
+                vlc_coeff = &s->ract_vlc[pt][ct][cg];
+            }
         }
     }
 }
-- 
1.7.3.1



More information about the libav-devel mailing list