diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-19 21:46:51 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-19 22:11:19 +0200 |
commit | ee402df9a25d1f0e15247511f524c0b7df102a27 (patch) | |
tree | e6eb3bc910fad920eefd7d3eac7162f4a94e8a92 /libavformat | |
parent | 2a70d8304dd2f8e97b9b0d2321ffbf6da69093f1 (diff) | |
download | ffmpeg-ee402df9a25d1f0e15247511f524c0b7df102a27.tar.gz |
mtvdec: check that the buf is large enough for probing
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mtv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mtv.c b/libavformat/mtv.c index 19b7793bae..2f7e5fddb1 100644 --- a/libavformat/mtv.c +++ b/libavformat/mtv.c @@ -57,7 +57,7 @@ static int mtv_probe(AVProbeData *p) return 0; /* Check for nonzero in bpp and (width|height) header fields */ - if(!(p->buf[51] && AV_RL16(&p->buf[52]) | AV_RL16(&p->buf[54]))) + if(p->buf_size < 57 || !(p->buf[51] && AV_RL16(&p->buf[52]) | AV_RL16(&p->buf[54]))) return 0; /* If width or height are 0 then imagesize header field should not */ |