From bb620df7aa98c129687382e4866e643b8482fc59 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 6 Dec 2012 15:04:15 +1100 Subject: [PATCH] Parser: Initialise geometry elements for VarDecl We were using uninitialised memory whilst parsing geometry, leaving random contents as the return for shape/overlay/etc sections. Somehow this actually worked everywhere but under Java. https://bugs.freedesktop.org/show_bug.cgi?id=57913 Signed-off-by: Daniel Stone --- src/xkbcomp/parser.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xkbcomp/parser.y b/src/xkbcomp/parser.y index 28c107b..5d10a4b 100644 --- a/src/xkbcomp/parser.y +++ b/src/xkbcomp/parser.y @@ -325,9 +325,9 @@ Decl : OptMergeMode VarDecl $2->merge = $1; $$ = &$2->common; } - | OptMergeMode ShapeDecl { } - | OptMergeMode SectionDecl { } - | OptMergeMode DoodadDecl { } + | OptMergeMode ShapeDecl { $$ = NULL; } + | OptMergeMode SectionDecl { $$ = NULL; } + | OptMergeMode DoodadDecl { $$ = NULL; } | MergeMode STRING { $$ = &IncludeCreate(param->ctx, $2, $1)->common;