From 0508861f29f2d3b79fb803353e4ea8ab32654bc4 Mon Sep 17 00:00:00 2001 From: Marta Lofstedt Date: Tue, 23 Jun 2015 13:03:13 +0200 Subject: [PATCH] mesa: NULL check InfoLog When a program is compiled, but linking failed the sh->InfoLog could be NULL. This is expoloited by OpenGL ES 3.1 conformance tests. Signed-off-by: Marta Lofstedt Reviewed-by: Anuj Phogat Reviewed-by: Matt Turner --- src/mesa/main/shaderapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 5b28a2caf3c..f9a7d130f9c 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -2033,8 +2033,8 @@ _mesa_create_shader_program(struct gl_context* ctx, GLboolean separate, } #endif } - - ralloc_strcat(&shProg->InfoLog, sh->InfoLog); + if (sh->InfoLog) + ralloc_strcat(&shProg->InfoLog, sh->InfoLog); } delete_shader(ctx, shader); -- 2.30.2