mesa: NULL check InfoLog
authorMarta Lofstedt <marta.lofstedt@intel.com>
Tue, 23 Jun 2015 11:03:13 +0000 (13:03 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 7 Aug 2015 10:17:07 +0000 (13:17 +0300)
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 <marta.lofstedt@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/shaderapi.c

index 5b28a2caf3cc9ee39273a844b02e3bf9e333ea55..f9a7d130f9ce5ab4c9b80e259b3e47bcf5434e95 100644 (file)
@@ -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);