Commit 673f4d0c authored by Chia-I Wu's avatar Chia-I Wu
Browse files

vrend: fix boundary check for SSBO state update



(PIPE_MAX_SHADER_BUFFERS - num_ssbo) can underflow.
Signed-off-by: Chia-I Wu's avatarChia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang's avatarYiwei Zhang <zzyiwei@chromium.org>
parent 029303e9
Pipeline #364627 passed with stages
in 23 minutes and 1 second
......@@ -1208,7 +1208,7 @@ static int vrend_decode_set_shader_buffers(struct vrend_context *ctx, const uint
return 0;
if (start_slot > PIPE_MAX_SHADER_BUFFERS ||
start_slot > PIPE_MAX_SHADER_BUFFERS - num_ssbo)
num_ssbo > PIPE_MAX_SHADER_BUFFERS - start_slot)
return EINVAL;
for (uint32_t i = 0; i < num_ssbo; i++) {
......
Supports Markdown
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