Commit 35dea49b0a1c2c5c832a612027c797f5c688aa13

Ran Benita 2014-02-22T23:20:04

symbols: fix possible use of uninitialized value Nothing bad can come out of it, but for some reason this error didn't return early (inherited from xkbcomp). Also promote the log message to an error, as it clearly is. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/xkbcomp/symbols.c b/src/xkbcomp/symbols.c
index eda8b8e..7ff8b71 100644
--- a/src/xkbcomp/symbols.c
+++ b/src/xkbcomp/symbols.c
@@ -786,10 +786,12 @@ SetSymbolsField(SymbolsInfo *info, KeyInfo *keyi, const char *field,
         xkb_layout_index_t ndx;
         xkb_atom_t val;
 
-        if (!ExprResolveString(ctx, value, &val))
-            log_vrb(ctx, 1,
+        if (!ExprResolveString(ctx, value, &val)) {
+            log_err(ctx,
                     "The type field of a key symbol map must be a string; "
                     "Ignoring illegal type definition\n");
+            return false;
+        }
 
         if (arrayNdx == NULL) {
             keyi->default_type = val;