Latest commit 409dfcd Jul 2, 2018 History
glGetBufferParameteriv updates the client side cached copy of the
buffer_size. However, when it updated the cache it by calling
glxx_buffer_info_set it trashed the mapped_pointer and mapped_size
values because they are in the same structure as the cached_size but
this was being allocated on the stack.

The trampled mapped_pointer / mapped_size could cause crashes or invalid
buffer data to be uploaded.

Change to read the current cached value and then modify just the
cached_size preserving whatever was in the cache before.

Fixes #323

Signed-off-by: Tim Gover <tim.gover@raspberrypi.org>
1 contributor

Users who have contributed to this file