From: Brian Paul Date: Thu, 26 Jul 2012 21:55:26 +0000 (-0600) Subject: svga: initialize svga_compile_key to zeros to be safe X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f37f1a72095653d4806280e5ef74373781c55184;p=mesa.git svga: initialize svga_compile_key to zeros to be safe --- 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