Commit 2e7905ee authored by Paul B. Mahol's avatar Paul B. Mahol Committed by Janne Grunau

cljr: fix buf_size sanity check

Signed-off-by: 's avatarJanne Grunau <janne-libav@jannau.net>
parent 652d81b2
...@@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx, ...@@ -62,7 +62,7 @@ static int decode_frame(AVCodecContext *avctx,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
if (buf_size / avctx->height < avctx->width) { if (buf_size < avctx->height * avctx->width) {
av_log(avctx, AV_LOG_ERROR, av_log(avctx, AV_LOG_ERROR,
"Resolution larger than buffer size. Invalid header?\n"); "Resolution larger than buffer size. Invalid header?\n");
return AVERROR_INVALIDDATA; 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