[FFmpeg-cvslog] avformat/swfdec: check version and size during probing
Michael Niedermayer
git at videolan.org
Wed Nov 6 13:04:43 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 6 12:44:02 2013 +0100| [ff1d81b08c06da62bc567ce7aadbcbf3d652b740] | committer: Michael Niedermayer
avformat/swfdec: check version and size during probing
Fixes probetest failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff1d81b08c06da62bc567ce7aadbcbf3d652b740
---
libavformat/swfdec.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 54e0f6d..aa6ce84 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;
More information about the ffmpeg-cvslog
mailing list