[Mesa-dev] [PATCH] tgsi: init translate ctx to zeros

Brian Paul brianp at vmware.com
Mon Mar 25 14:54:32 PDT 2013


Fixes uninitialized member bug spotted by Ondrej Holecek.

Note: This is a candidate for the stable branches.
---
 src/gallium/auxiliary/tgsi/tgsi_text.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/auxiliary/tgsi/tgsi_text.c b/src/gallium/auxiliary/tgsi/tgsi_text.c
index 6b97bee..fd243a5 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_text.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_text.c
@@ -1570,7 +1570,7 @@ tgsi_text_translate(
    struct tgsi_token *tokens,
    uint num_tokens )
 {
-   struct translate_ctx ctx;
+   struct translate_ctx ctx = { 0 };
 
    ctx.text = text;
    ctx.cur = text;
-- 
1.7.3.4



More information about the mesa-dev mailing list