Without a protocol, keymap cannot be loaded and causes a segfault. Reported-by: Camden Lindsay <camden.lindsay+kernel@xxxxxxxxx> Signed-off-by: Sean Young <sean@xxxxxxxx> --- utils/common/keymap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/utils/common/keymap.c b/utils/common/keymap.c index d06deb59..6ca33745 100644 --- a/utils/common/keymap.c +++ b/utils/common/keymap.c @@ -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; -- 2.24.1