diff options
author | Brian Paul <[email protected]> | 2018-01-26 11:27:33 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2018-01-30 09:07:59 -0700 |
commit | e863541e43997cb701067fdc525f75e99b5b187e (patch) | |
tree | 33e93fc4cd9325b341cc694db0b44ac9e3fdb524 /src | |
parent | fcee2cc71185d3dd5faf3214e8fb2be1c9a39501 (diff) |
mesa: check/assert array index in _mesa_bind_vertex_buffer()
Reviewed-by: Gert Wollny <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/varray.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index bda1c5a3b68..2801a6fa692 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -166,6 +166,7 @@ _mesa_bind_vertex_buffer(struct gl_context *ctx, struct gl_buffer_object *vbo, GLintptr offset, GLsizei stride) { + assert(index < ARRAY_SIZE(vao->BufferBinding)); struct gl_vertex_buffer_binding *binding = &vao->BufferBinding[index]; if (binding->BufferObj != vbo || |