zmbv: Reset the decoder on keyframe errors

Prevent the crash on fuzzed files as reported in bug 63.
(cherry picked from commit c1d1ef4ecd)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
Luca Barbato
2013-01-11 05:07:42 +01:00
parent 58baa367d6
commit fbde7b2d0a

View File

@@ -428,6 +428,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
c->fmt = buf[3]; c->fmt = buf[3];
c->bw = buf[4]; c->bw = buf[4];
c->bh = buf[5]; c->bh = buf[5];
c->decode_intra = NULL;
c->decode_xor = NULL;
buf += 6; buf += 6;
len -= 6; len -= 6;