zmbv: Reset the decoder on keyframe errors
authorLuca Barbato <lu_zero@gentoo.org>
Fri, 11 Jan 2013 04:07:42 +0000 (05:07 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Fri, 11 Jan 2013 04:07:42 +0000 (05:07 +0100)
Prevent the crash on fuzzed files as reported in bug 63.

libavcodec/zmbv.c

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