From 534e631b00a3b065016df23aa0f6b7d043e9ed86 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sat, 4 Sep 2021 17:04:26 +0100 Subject: [PATCH] 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). --- src/data.c | 2 ++ 1 file changed, 2 insertions(+) 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. */ -- 2.39.2