From: Vinson Lee Date: Fri, 3 Aug 2012 05:38:24 +0000 (-0700) Subject: draw: Ensure channel in convert_to_soa is initialized. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5bce0b51755e465d6aa9077df2167018d2e5150c;p=mesa.git draw: Ensure channel in convert_to_soa is initialized. Fixes uninitialized pointer read defect reported by Coverity. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 8d9b5309aff..3400661fb29 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -559,7 +559,7 @@ convert_to_soa(struct gallivm_state *gallivm, unsigned pixels_per_channel = soa_type.length / TGSI_NUM_CHANNELS; for (j = 0; j < TGSI_NUM_CHANNELS; ++j) { - LLVMValueRef channel[LP_MAX_VECTOR_LENGTH]; + LLVMValueRef channel[LP_MAX_VECTOR_LENGTH] = { 0 }; assert(pixels_per_channel <= LP_MAX_VECTOR_LENGTH);