changeset 8736:f973fff63599 libavcodec

VP3: Prevent stack corruption from an unset custom coding method.
author alexc
date Tue, 03 Feb 2009 22:59:47 +0000
parents 5d7ebbb7e91b
children eeca2fc122f8
files vp3.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/vp3.c	Tue Feb 03 20:49:02 2009 +0000
+++ b/vp3.c	Tue Feb 03 22:59:47 2009 +0000
@@ -742,6 +742,8 @@
         /* is it a custom coding scheme? */
         if (scheme == 0) {
             for (i = 0; i < 8; i++)
+                custom_mode_alphabet[i] = MODE_INTER_NO_MV;
+            for (i = 0; i < 8; i++)
                 custom_mode_alphabet[get_bits(gb, 3)] = i;
         }