Mesa (master): draw: Ensure channel in convert_to_soa is initialized.
Vinson Lee
vlee at kemper.freedesktop.org
Sat Aug 4 05:29:26 UTC 2012
Module: Mesa
Branch: master
Commit: 5bce0b51755e465d6aa9077df2167018d2e5150c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5bce0b51755e465d6aa9077df2167018d2e5150c
Author: Vinson Lee <vlee at freedesktop.org>
Date: Thu Aug 2 22:38:24 2012 -0700
draw: Ensure channel in convert_to_soa is initialized.
Fixes uninitialized pointer read defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/auxiliary/draw/draw_llvm.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 8d9b530..3400661 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);
More information about the mesa-commit
mailing list