Mesa (11.2): radeonsi: fix bounds check in si_create_vertex_elements

Emil Velikov evelikov at kemper.freedesktop.org
Thu Apr 14 19:39:07 UTC 2016


Module: Mesa
Branch: 11.2
Commit: fbdd845ed213871c221f1076ea83621ebe779f4e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fbdd845ed213871c221f1076ea83621ebe779f4e

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Tue Apr 12 12:23:31 2016 -0500

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" <mesa-stable at lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
(cherry picked from commit a191e6b719848a17963f185954f1696fa5a2bcb1)

---

 src/gallium/drivers/radeonsi/si_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 663ebb3..58573ac 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -3284,7 +3284,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;
 




More information about the mesa-commit mailing list