From 23218a980170a7bad1e2359889fb1d8da73777e1 Mon Sep 17 00:00:00 2001 From: Kostya Shishkov Date: Tue, 15 Sep 2009 15:22:36 +0000 Subject: [PATCH] Make probing for VC1 test bitstream format stricter Originally committed as revision 19860 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/vc1test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c index 861846c48a..f7ac984c9b 100644 --- a/libavformat/vc1test.c +++ b/libavformat/vc1test.c @@ -33,7 +33,9 @@ static int vc1t_probe(AVProbeData *p) { - if (p->buf[3] != 0xC5 || AV_RL32(&p->buf[4]) != 4) + if (p->buf_size < 24) + return 0; + if (p->buf[3] != 0xC5 || AV_RL32(&p->buf[4]) != 4 || AV_RL32(&p->buf[20]) != 0xC) return 0; return AVPROBE_SCORE_MAX/2;