Edit

kc3-lang/libxkbcommon/test/data/keymaps/empty-symbol-decl.xkb

Branch :

  • Show log

    Commit

  • Author : Yuichiro Hanada
    Date : 2024-01-27 23:00:28
    Hash : efdb05d1
    Message : parser: Do now allow the empty symbol declaration An empty element is allowed in SymbolsBody definition, so the following keymap is gramatically correct. ``` xkb_keymap { ... xkb_symbols "sym" { key <SPC> {, [Space] }; }; }; ``` However, the current parser crashes with the keymap due to null pointer access. This change fixes it by changing the parser not to allow it.

  • test/data/keymaps/empty-symbol-decl.xkb
  • xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete" };
        xkb_compat    { include "complete" };
        xkb_symbols "sym" {
            // This syntax caused the crash in parser before, and is not accepted
            // anymore.
            key <SPC> { , [Space] };
        };
    };