glx: fix incorrect array stack memory allocation
The array stack space wasn't allocated to the proper size. Fixes out of bounds memory writes when the client/array stack depth exceeds one. See fd.o bug 26768.
This commit is contained in:
committed by
Brian Paul
parent
c78f84eebb
commit
83f1183e76
@@ -291,7 +291,8 @@ __glXInitVertexArrayState(__GLXcontext * gc)
|
||||
|
||||
arrays->stack_index = 0;
|
||||
arrays->stack = malloc(sizeof(struct array_stack_state)
|
||||
* arrays->num_arrays);
|
||||
* arrays->num_arrays
|
||||
* __GL_CLIENT_ATTRIB_STACK_DEPTH);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user