From f37f1a72095653d4806280e5ef74373781c55184 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 26 Jul 2012 15:55:26 -0600 Subject: svga: initialize svga_compile_key to zeros to be safe --- src/gallium/drivers/svga/svga_tgsi.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/gallium/drivers/svga/svga_tgsi.c b/src/gallium/drivers/svga/svga_tgsi.c index f4ddefbec27..8bea7f88dca 100644 --- a/src/gallium/drivers/svga/svga_tgsi.c +++ b/src/gallium/drivers/svga/svga_tgsi.c @@ -348,6 +348,8 @@ svga_translate_fragment_program( const struct svga_fragment_shader *fs, { struct svga_compile_key key; + memset(&key, 0, sizeof(key)); + memcpy(&key.fkey, fkey, sizeof *fkey); memcpy(key.generic_remap_table, fs->generic_remap_table, @@ -364,6 +366,8 @@ svga_translate_vertex_program( const struct svga_vertex_shader *vs, { struct svga_compile_key key; + memset(&key, 0, sizeof(key)); + memcpy(&key.vkey, vkey, sizeof *vkey); /* Note: we could alternately store the remap table in the vkey but -- cgit v1.2.3