mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
mesa: In validate_program(), initialize errMsg for safety.
validate_program relies on validate_shader_program to fill in errMsg; empirically, there exist cases where that doesn't happen. While tracking those down may be worthwhile, initializing the string so we don't try to ralloc_strdup random garbage also seems wise. Fixes issues caught by valgrind while running some test case. NOTE: This is a candidate for stable release branches. Reviewed-by: Chad Versace <chad@chad-versace.us> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
a9e97d022c
commit
db726b048e
1 changed files with 1 additions and 1 deletions
|
|
@ -1125,7 +1125,7 @@ static void
|
|||
validate_program(struct gl_context *ctx, GLuint program)
|
||||
{
|
||||
struct gl_shader_program *shProg;
|
||||
char errMsg[100];
|
||||
char errMsg[100] = "";
|
||||
|
||||
shProg = _mesa_lookup_shader_program_err(ctx, program, "glValidateProgram");
|
||||
if (!shProg) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue