summaryrefslogtreecommitdiff
path: root/libavformat/vc1test.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-09-15 15:22:36 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-09-15 15:22:36 +0000
commit23218a980170a7bad1e2359889fb1d8da73777e1 (patch)
tree2dc6db7237243d2a3b9e24e4969037719f60be2c /libavformat/vc1test.c
parent23703388505bdabb4149d67bc476efe1c0c4b7a7 (diff)
Make probing for VC1 test bitstream format stricter
Originally committed as revision 19860 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/vc1test.c')
-rw-r--r--libavformat/vc1test.c4
1 files changed, 3 insertions, 1 deletions
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;