From: Nicolai Hähnle Date: Tue, 12 Apr 2016 17:23:31 +0000 (-0500) Subject: radeonsi: fix bounds check in si_create_vertex_elements X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a191e6b719848a17963f185954f1696fa5a2bcb1;p=mesa.git radeonsi: fix bounds check in si_create_vertex_elements This was triggered by dEQP-GLES3.functional.vertex_array_objects.all_attributes Cc: "11.1 11.2" Reviewed-by: Bas Nieuwenhuizen Reviewed-by: Marek Olšák --- diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index 85ee1c4701b..664506e85d4 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3278,7 +3278,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx, struct si_vertex_element *v = CALLOC_STRUCT(si_vertex_element); int i; - assert(count < SI_MAX_ATTRIBS); + assert(count <= SI_MAX_ATTRIBS); if (!v) return NULL;