Mesa (master): mesa: avoid segfault in GetProgramPipelineInfoLog when no length
Ilia Mirkin
imirkin at kemper.freedesktop.org
Fri Feb 12 23:25:03 UTC 2016
Module: Mesa
Branch: master
Commit: f56b5de877c165fd89fbc670c4bd64f4f9637643
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f56b5de877c165fd89fbc670c4bd64f4f9637643
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Fri Feb 12 14:23:30 2016 -0500
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 at alum.mit.edu>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/main/pipelineobj.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 0e4a0af..af17be2 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -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);
}
More information about the mesa-commit
mailing list