From f85b8678c4a08fd91d9b5f32dcde2f0b21bc6e38 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 1 Sep 2021 19:27:43 +0300 Subject: [PATCH] Fix segfault with invalid key-translation-map binding * src/keyboard.c (access_keymap_keyremap): Don't assume an invalid function is specified as a symbol. Reported by Perry E. Metzger . --- src/keyboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 6a8c33ae3b6..f6139b30e7e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -9188,8 +9188,7 @@ access_keymap_keyremap (Lisp_Object map, Lisp_Object key, Lisp_Object prompt, /* If the function returned something invalid, barf--don't ignore it. */ if (! (NILP (next) || VECTORP (next) || STRINGP (next))) - error ("Function %s returns invalid key sequence", - SSDATA (SYMBOL_NAME (tem))); + signal_error ("Function returns invalid key sequence", tem); } return next; } -- 2.39.2