mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-13 01:10:15 +01:00
mesa: clamp binary pointer in ShaderBinary if length==0
this pointer is only valid if length is valid fixes dEQP-GL45-ES3.functional.negative_api.shader.shader_binary with glthread enabled fixes #10915 cc: mesa-stable Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28501>
This commit is contained in:
parent
6e91c88036
commit
37be4bf1b7
1 changed files with 4 additions and 0 deletions
|
|
@ -2361,6 +2361,10 @@ _mesa_ShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat,
|
|||
GET_CURRENT_CONTEXT(ctx);
|
||||
struct gl_shader **sh;
|
||||
|
||||
/* no binary data can be loaded if length==0 */
|
||||
if (!length)
|
||||
binary = NULL;
|
||||
|
||||
/* Page 68, section 7.2 'Shader Binaries" of the of the OpenGL ES 3.1, and
|
||||
* page 88 of the OpenGL 4.5 specs state:
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue