From: Basil L. Contovounesios Date: Sat, 4 Sep 2021 16:04:26 +0000 (+0100) Subject: Avoid segfault in command-modes X-Git-Tag: emacs-28.0.90~1179 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=534e631b00a3b065016df23aa0f6b7d043e9ed86;p=emacs.git Avoid segfault in command-modes * src/data.c (Fcommand_modes): Check that bytecode object is interactive before accessing its interactive spec to avoid segfaulting (bug#50376). --- diff --git a/src/data.c b/src/data.c index ffca7e75355..27b642df286 100644 --- a/src/data.c +++ b/src/data.c @@ -1045,6 +1045,8 @@ The value, if non-nil, is a list of mode name symbols. */) if (COMPILEDP (fun)) { + if (PVSIZE (fun) <= COMPILED_INTERACTIVE) + return Qnil; Lisp_Object form = AREF (fun, COMPILED_INTERACTIVE); if (VECTORP (form)) /* New form -- the second element is the command modes. */