diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2021-09-04 17:04:26 +0100 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2021-09-04 21:28:31 +0200 |
commit | 534e631b00a3b065016df23aa0f6b7d043e9ed86 (patch) | |
tree | 490c63a115a9b087d4a7370fbf5d181dbae0e53b /src | |
parent | 0fe03c47409ebd702837fc74196d7344a916c495 (diff) | |
download | emacs-534e631b00a3b065016df23aa0f6b7d043e9ed86.tar.gz emacs-534e631b00a3b065016df23aa0f6b7d043e9ed86.tar.bz2 emacs-534e631b00a3b065016df23aa0f6b7d043e9ed86.zip |
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).
Diffstat (limited to 'src')
-rw-r--r-- | src/data.c | 2 |
1 files changed, 2 insertions, 0 deletions
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. */ |