diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 19:32:04 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-17 19:32:04 +0200 |
commit | ebf6d1d295debe112b990bea772f26a0441af079 (patch) | |
tree | 8cfdce99d71efe8444122af2882431eebe1aeff8 /libavcodec | |
parent | 096231d497457be9496b0be01ff6da2093186c3c (diff) | |
download | ffmpeg-ebf6d1d295debe112b990bea772f26a0441af079.tar.gz |
nuv: check buffer size before checking content.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/nuv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 4bc236dce2..bb236d1edf 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -191,7 +191,7 @@ retry: } if (c->codec_frameheader) { int w, h, q, res; - if (buf[0] != 'V' || buf_size < 12) { + if (buf_size < 12 || buf[0] != 'V') { av_log(avctx, AV_LOG_ERROR, "invalid nuv video frame (wrong codec_tag?)\n"); return AVERROR_INVALIDDATA; } |