From 817e92b2bddbdbe18d3b8cd34533b4bec04d313d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 15 Sep 2017 16:15:05 +0300 Subject: [PATCH] Avoid crashes due to invalid error forms from sentinels/filters * src/process.c (exec_sentinel_error_handler): Make sure the error form passed to cmd_error_internal is a cons cell. (Bug#28430) --- src/process.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/process.c b/src/process.c index b941b5c1f9c..2733fa39113 100644 --- a/src/process.c +++ b/src/process.c @@ -7102,6 +7102,10 @@ deliver_child_signal (int sig) static Lisp_Object exec_sentinel_error_handler (Lisp_Object error_val) { + /* Make sure error_val is a cons cell, as all the rest of error + handling expects that, and will barf otherwise. */ + if (!CONSP (error_val)) + error_val = Fcons (Qerror, error_val); cmd_error_internal (error_val, "error in process sentinel: "); Vinhibit_quit = Qt; update_echo_area (); -- 2.11.4.GIT