提交 de41b555 编写于 作者: L Luca Barbato

truemotion2: Fix the buffer check

The variable skip contains the expected size in bytes.

Bug-Id: 906
CC: libav-stable@libav.org
Signed-off-by: NLuca Barbato <lu_zero@gentoo.org>
上级 4a326923
......@@ -291,7 +291,7 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
if (len == 0)
return 4;
if (len >= INT_MAX/4-1 || len < 0 || len > buf_size) {
if (len >= INT_MAX / 4 - 1 || len < 0 || skip > buf_size) {
av_log(ctx->avctx, AV_LOG_ERROR, "Error, invalid stream size.\n");
return AVERROR_INVALIDDATA;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册