Commit ebf6d1d2 authored by Michael Niedermayer's avatar Michael Niedermayer

nuv: check buffer size before checking content.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 096231d4
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment