diff options
| author | Pip Cet | 2025-06-10 12:00:30 +0000 |
|---|---|---|
| committer | Pip Cet | 2025-06-10 12:00:30 +0000 |
| commit | 888f846d377a589c6fca5be5d2f4274f423e5fcf (patch) | |
| tree | 30d055e3ff2b7b19effd19bf5e07ff791d6dd207 /src | |
| parent | 51b9e92ab8e13e1ea3ce9c2f96631f62c6081b62 (diff) | |
| download | emacs-888f846d377a589c6fca5be5d2f4274f423e5fcf.tar.gz emacs-888f846d377a589c6fca5be5d2f4274f423e5fcf.zip | |
Fix crash when evaluating "(signal nil 5)" (bug#78738)
The docstring already warns against calling signal with a nil
error symbol, which is for internal use only, but we can avoid crashing
in this case.
* src/eval.c (Fsignal): Produce a "peculiar error" for more arguments
involving non-lists.
Diffstat (limited to 'src')
| -rw-r--r-- | src/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index caae4cb17e2..ecff5d40a10 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1817,7 +1817,7 @@ See also the function `condition-case'. */ | |||
| 1817 | (Lisp_Object error_symbol, Lisp_Object data) | 1817 | (Lisp_Object error_symbol, Lisp_Object data) |
| 1818 | { | 1818 | { |
| 1819 | /* If they call us with nonsensical arguments, produce "peculiar error". */ | 1819 | /* If they call us with nonsensical arguments, produce "peculiar error". */ |
| 1820 | if (NILP (error_symbol) && NILP (data)) | 1820 | if (NILP (error_symbol) && !CONSP (data)) |
| 1821 | error_symbol = Qerror; | 1821 | error_symbol = Qerror; |
| 1822 | signal_or_quit (error_symbol, data, false); | 1822 | signal_or_quit (error_symbol, data, false); |
| 1823 | eassume (false); | 1823 | eassume (false); |