projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcee2cc
)
mesa: check/assert array index in _mesa_bind_vertex_buffer()
author
Brian Paul
<brianp@vmware.com>
Fri, 26 Jan 2018 18:27:33 +0000
(11:27 -0700)
committer
Brian Paul
<brianp@vmware.com>
Tue, 30 Jan 2018 16:07:59 +0000
(09:07 -0700)
Reviewed-by: Gert Wollny <gw.fossdev@gmail.com>
src/mesa/main/varray.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/varray.c
b/src/mesa/main/varray.c
index bda1c5a3b6855cb8c15591169b981b397dae7b10..2801a6fa692052d5d3d28ec68c088d40bd463c5b 100644
(file)
--- 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 ||