Commit e1bc0171 authored by Reimar Döffinger's avatar Reimar Döffinger

nuv: check size of buffer before accessing it instead of after.

Signed-off-by: 's avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
parent 1f68be47
......@@ -164,7 +164,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
return orig_size;
}
if (buf[0] != 'V' || buf_size < 12) {
if (buf_size < 12 || buf[0] != 'V') {
av_log(avctx, AV_LOG_ERROR, "not a nuv video frame\n");
return -1;
}
......
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