keytable: keymap without protocol is invalid
PATCH 1/1 keytable: keymap without protocol is invalid
Without a protocol, keymap cannot be loaded and causes a segfault.
Reported-by Camden Lindsay <[email protected]>
Signed-off-by Sean Young <[email protected]>
--- utils/common/keymap.c | 5 +++++ 1 file changed, 5 insertions(+)
utils/common/keymap.c +5 -0
@@ -169,6 +169,11 @@ static error_t parse_plain_keymap(char *fname, struct keymap **keymap, bool verb }fclose (fin); +if (!map->protocol) { +fprintf (stderr,_ ("Missing protocol in %s\n" ), fname); +return EINVAL ; + } + *keymap = map;return 0 ;
Signature · 1 line
2.24.1