summaryrefslogtreecommitdiff
path: root/libavformat/swfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-11-06 12:44:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-11-06 12:44:02 +0100
commitff1d81b08c06da62bc567ce7aadbcbf3d652b740 (patch)
tree4780c3535cda8eed269588a6621d46d0182ad3f2 /libavformat/swfdec.c
parent7b7697646b9b0effa02c1d318f2f76d56f98f8d2 (diff)
downloadffmpeg-ff1d81b08c06da62bc567ce7aadbcbf3d652b740.tar.gz
avformat/swfdec: check version and size during probing
Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r--libavformat/swfdec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 54e0f6dc0e..aa6ce8464e 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -55,9 +55,12 @@ static int get_swf_tag(AVIOContext *pb, int *len_ptr)
static int swf_probe(AVProbeData *p)
{
+ if(p->buf_size < 15)
+ return 0;
+
/* check file header */
if ((p->buf[0] == 'F' || p->buf[0] == 'C') && p->buf[1] == 'W' &&
- p->buf[2] == 'S')
+ p->buf[2] == 'S' && p->buf[3] < 20)
return AVPROBE_SCORE_MAX;
else
return 0;