mirror of
https://github.com/raspberrypi/userland.git
synced 2025-12-24 20:51:26 +00:00
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>