From: alexc Date: Tue, 3 Feb 2009 22:59:47 +0000 (+0000) Subject: VP3: Prevent stack corruption from an unset custom coding method. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/commitdiff_plain/71a04b8a27d6d519e0ea85af87da886a718ad822 VP3: Prevent stack corruption from an unset custom coding method. git-svn-id: file:///var/local/repositories/ffmpeg/trunk@16978 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 8dc2da4f0..c44e6e49b 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -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; }