]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
VP3: Prevent stack corruption from an unset custom coding method.
authoralexc <alexc@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 3 Feb 2009 22:59:47 +0000 (22:59 +0000)
committeralexc <alexc@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Tue, 3 Feb 2009 22:59:47 +0000 (22:59 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16978 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/vp3.c

index 8dc2da4f03fd676bce68f4abd58ad01d2b9cd4b1..c44e6e49b7fe42e724fdaa518916560f4bef3455 100644 (file)
@@ -741,6 +741,8 @@ static int unpack_modes(Vp3DecodeContext *s, GetBitContext *gb)
 
         /* 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;
         }