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.
This commit is contained in:
@@ -1817,7 +1817,7 @@ See also the function `condition-case'. */
|
||||
(Lisp_Object error_symbol, Lisp_Object data)
|
||||
{
|
||||
/* If they call us with nonsensical arguments, produce "peculiar error". */
|
||||
if (NILP (error_symbol) && NILP (data))
|
||||
if (NILP (error_symbol) && !CONSP (data))
|
||||
error_symbol = Qerror;
|
||||
signal_or_quit (error_symbol, data, false);
|
||||
eassume (false);
|
||||
|
||||
Reference in New Issue
Block a user