Edit

kc3-lang/libxkbcommon/test/data/keymaps/invalid-escape-sequence.xkb

Branch :

  • Show log

    Commit

  • Author : Pierre Le Marre
    Date : 2023-09-26 17:05:14
    Hash : 0038c866
    Message : Prevent overflow of octal escape sequences The octal parser accepts the range `\1..\777`. The result is cast to `char` which will silently overflow. This commit prevents overlow and will treat `\400..\777` as invalid escape sequences.

  • test/data/keymaps/invalid-escape-sequence.xkb
  • xkb_keymap {
        // The following include statement has an octal escape sequence that
        // must be ignored. Else it would insert a NULL character and thus
        // truncates the string to "evde", while we expect "evdev+aliases(qwerty)".
        xkb_keycodes  { include "evde\0v+aliases(qwerty)" };
        // The following include statement has two octal escape sequences that
        // should be ignored, else they would overflow.
        xkb_types     { include "com\401ple\777te" };
        xkb_compat    { include "complete" };
        xkb_symbols   { include "pc+us" };
    };