diff options
author | Kenneth Graunke <[email protected]> | 2011-07-30 21:26:26 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-08-05 14:19:39 -0700 |
commit | db726b048e8858af226dbd0f0fda72d0be01394e (patch) | |
tree | 31d8aac6acb077a3237c9c05b781e0589e2244ae /src/mesa/main/shaderapi.c | |
parent | a9e97d022cb68266639eb54947517454c8ffe45e (diff) |
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 <[email protected]>
Signed-off-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderapi.c')
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 8df25c3f988..74997eaaa77 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -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) { |