mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
mesa: avoid segfault in GetProgramPipelineInfoLog when no length
If there is no pipe info log, we would unconditionally deref length, which was only optionally there. _mesa_copy_string handles the source being null, as well as the length, so may as well just always call it. Fixes a segfault in dEQP-GLES31.functional.state_query.program_pipeline.info_log Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
f82ff6207c
commit
f56b5de877
1 changed files with 1 additions and 4 deletions
|
|
@ -964,8 +964,5 @@ _mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize,
|
|||
return;
|
||||
}
|
||||
|
||||
if (pipe->InfoLog)
|
||||
_mesa_copy_string(infoLog, bufSize, length, pipe->InfoLog);
|
||||
else
|
||||
*length = 0;
|
||||
_mesa_copy_string(infoLog, bufSize, length, pipe->InfoLog);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue