diff options
| author | Eli Zaretskii | 2017-09-15 16:15:05 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-09-15 16:15:05 +0300 |
| commit | 817e92b2bddbdbe18d3b8cd34533b4bec04d313d (patch) | |
| tree | 2de657ac98503ef3d75800f6514acf5c4f7480db /src/process.c | |
| parent | 015172d1ba36de9ab2ca2cae020b6ab6793dbb8c (diff) | |
| download | emacs-817e92b2bddbdbe18d3b8cd34533b4bec04d313d.tar.gz emacs-817e92b2bddbdbe18d3b8cd34533b4bec04d313d.zip | |
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)
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
| 7102 | static Lisp_Object | 7102 | static Lisp_Object |
| 7103 | exec_sentinel_error_handler (Lisp_Object error_val) | 7103 | exec_sentinel_error_handler (Lisp_Object error_val) |
| 7104 | { | 7104 | { |
| 7105 | /* Make sure error_val is a cons cell, as all the rest of error | ||
| 7106 | handling expects that, and will barf otherwise. */ | ||
| 7107 | if (!CONSP (error_val)) | ||
| 7108 | error_val = Fcons (Qerror, error_val); | ||
| 7105 | cmd_error_internal (error_val, "error in process sentinel: "); | 7109 | cmd_error_internal (error_val, "error in process sentinel: "); |
| 7106 | Vinhibit_quit = Qt; | 7110 | Vinhibit_quit = Qt; |
| 7107 | update_echo_area (); | 7111 | update_echo_area (); |