cogl-vertex-buffer: Fix the size of the array of attribute pointers
In update_primitive_attributes it tries to fill in an array of pointers with a NULL terminator. However it was only allocating enough space for a pointer for each of the attributes plus one byte instead of plus enough bytes for another pointer. Thomas Wood found this bug with static analysis.
This commit is contained in:
parent
463603f1a0
commit
cdfad9cdbe
@ -1164,7 +1164,7 @@ update_primitive_attributes (CoglVertexBuffer *buffer)
|
||||
|
||||
g_return_if_fail (n_attributes > 0);
|
||||
|
||||
attributes = g_alloca (sizeof (CoglAttribute *) * n_attributes + 1);
|
||||
attributes = g_alloca (sizeof (CoglAttribute *) * (n_attributes + 1));
|
||||
|
||||
i = 0;
|
||||
for (l = buffer->submitted_vbos; l; l = l->next)
|
||||
|
Loading…
Reference in New Issue
Block a user