diff options
| author | Po Lu | 2022-12-20 15:42:26 +0800 |
|---|---|---|
| committer | Po Lu | 2022-12-20 15:42:45 +0800 |
| commit | f47419766d219b043ed368c062e40dc78e41ed6e (patch) | |
| tree | 451caaa9f158fb590353b2ad0fe82a169785f07c /src | |
| parent | b4941419c5ba2818c82b58250eed9ac1c8f9dab9 (diff) | |
| download | emacs-f47419766d219b043ed368c062e40dc78e41ed6e.tar.gz emacs-f47419766d219b043ed368c062e40dc78e41ed6e.zip | |
Improve safety of calls to vendor-specific-keysyms
* src/xterm.c (x_term_init): Wrap call to
vendor-specific-keysyms inside safe_call.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/xterm.c b/src/xterm.c index a1acfa80744..60d48165650 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -29894,13 +29894,17 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 29894 | { | 29894 | { |
| 29895 | char *vendor = ServerVendor (dpy); | 29895 | char *vendor = ServerVendor (dpy); |
| 29896 | 29896 | ||
| 29897 | /* Temporarily hide the partially initialized terminal. */ | 29897 | /* Temporarily hide the partially initialized terminal. |
| 29898 | Use safe_call so that if a signal happens, a partially | ||
| 29899 | initialized display (and display connection) is not | ||
| 29900 | kept around. */ | ||
| 29898 | terminal_list = terminal->next_terminal; | 29901 | terminal_list = terminal->next_terminal; |
| 29899 | unblock_input (); | 29902 | unblock_input (); |
| 29900 | kset_system_key_alist | 29903 | kset_system_key_alist (terminal->kboard, |
| 29901 | (terminal->kboard, | 29904 | safe_call1 (Qvendor_specific_keysyms, |
| 29902 | call1 (Qvendor_specific_keysyms, | 29905 | (vendor |
| 29903 | vendor ? build_string (vendor) : empty_unibyte_string)); | 29906 | ? build_string (vendor) |
| 29907 | : empty_unibyte_string))); | ||
| 29904 | block_input (); | 29908 | block_input (); |
| 29905 | terminal->next_terminal = terminal_list; | 29909 | terminal->next_terminal = terminal_list; |
| 29906 | terminal_list = terminal; | 29910 | terminal_list = terminal; |