Commit 78f8994a authored by Marc-André Lureau's avatar Marc-André Lureau Committed by Dave Airlie

decode: check set_uniform_buffer arguments

Fix found thanks to american fuzzy lop.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent 3c0a03de
......@@ -237,6 +237,13 @@ static int vrend_decode_set_uniform_buffer(struct vrend_decode_ctx *ctx, int len
if (length != VIRGL_SET_UNIFORM_BUFFER_SIZE)
return EINVAL;
if (shader >= PIPE_SHADER_TYPES)
return EINVAL;
if (index >= PIPE_MAX_CONSTANT_BUFFERS)
return EINVAL;
vrend_set_uniform_buffer(ctx->grctx, shader, index, offset, blength, handle);
return 0;
}
......
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