summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-08-28 21:43:54 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-08-30 13:11:00 -0700
commit66994036517d2cfe4882fc6bf6a6b32649dda5b1 (patch)
treeb45a636c5118b8e4d3976ee60f66bc039a3f57f6
parent6820f75c91b7b6eb60b1cbef4903677235d512de (diff)
downloadexternal_mesa3d-66994036517d2cfe4882fc6bf6a6b32649dda5b1.zip
external_mesa3d-66994036517d2cfe4882fc6bf6a6b32649dda5b1.tar.gz
external_mesa3d-66994036517d2cfe4882fc6bf6a6b32649dda5b1.tar.bz2
glsl: Initialize outputs[] array in lower_blend_equation_advanced.
Caught by Coverity. Likely fixes real issues if an output component is not present. CID: 1372278 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
-rw-r--r--src/compiler/glsl/lower_blend_equation_advanced.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/glsl/lower_blend_equation_advanced.cpp b/src/compiler/glsl/lower_blend_equation_advanced.cpp
index a998df1..1d03392 100644
--- a/src/compiler/glsl/lower_blend_equation_advanced.cpp
+++ b/src/compiler/glsl/lower_blend_equation_advanced.cpp
@@ -497,7 +497,7 @@ lower_blend_equation_advanced(struct gl_linked_shader *sh)
* which writes a subset of the components, starting at location_frac.
* The variables can't overlap, thankfully.
*/
- ir_variable *outputs[4];
+ ir_variable *outputs[4] = { NULL, NULL, NULL, NULL };
foreach_in_list(ir_instruction, ir, sh->ir) {
ir_variable *var = ir->as_variable();
if (!var || var->data.mode != ir_var_shader_out)