From 3f02922c7ea5b70f81552eba9491cfb837cb65be Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Mon, 28 Dec 2020 15:13:14 +0100 Subject: [PATCH] vrend: remove superflous range check This is now already checked before we decode the command. Signed-off-by: Gert Wollny Reviewed-by: Chia-I Wu --- src/vrend_decode.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/vrend_decode.c b/src/vrend_decode.c index 4783860..d7fbf6a 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -404,9 +404,6 @@ static int vrend_decode_resource_inline_write(struct vrend_decode_ctx *ctx, cons if (length < 12) return EINVAL; - if (length + ctx->ds->buf_offset > ctx->ds->buf_total) - return EINVAL; - memset(&info, 0, sizeof(info)); info.box = &box; vrend_decode_transfer_common(ctx, buf, &dst_handle, &info);