From: Eli Zaretskii Date: Wed, 1 Sep 2021 16:27:43 +0000 (+0300) Subject: Fix segfault with invalid key-translation-map binding X-Git-Tag: emacs-28.0.90~1232 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f85b8678c4a08fd91d9b5f32dcde2f0b21bc6e38;p=emacs.git 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 . --- 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; }