diff options
| author | Po Lu | 2022-06-19 13:32:27 +0800 |
|---|---|---|
| committer | Po Lu | 2022-06-19 13:32:36 +0800 |
| commit | 823b503c9da3d69a369bfeb1c2496cd22933360a (patch) | |
| tree | e1b4c03f43e9ad8b7fd5403eb37720277b035c33 /src | |
| parent | 6d0148c5412b0a08dc36cfe1e1814e4804d3f422 (diff) | |
| download | emacs-823b503c9da3d69a369bfeb1c2496cd22933360a.tar.gz emacs-823b503c9da3d69a369bfeb1c2496cd22933360a.zip | |
Fix crashes when the _EMACS_DRAG_ATOM is the wrong type
* src/xterm.c (xm_get_drag_atom_1): Don't use PropModeAppend if
rc != Success.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c index d83a56a6cba..455d5b795e9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2299,8 +2299,9 @@ xm_get_drag_atom_1 (struct x_display_info *dpyinfo, | |||
| 2299 | 2299 | ||
| 2300 | XChangeProperty (dpyinfo->display, dpyinfo->root_window, | 2300 | XChangeProperty (dpyinfo->display, dpyinfo->root_window, |
| 2301 | dpyinfo->Xatom_EMACS_DRAG_ATOM, XA_ATOM, 32, | 2301 | dpyinfo->Xatom_EMACS_DRAG_ATOM, XA_ATOM, 32, |
| 2302 | (rc == Success && (actual_format != 32 | 2302 | (rc != Success |
| 2303 | || actual_type != XA_ATOM) | 2303 | || (actual_format != 32 |
| 2304 | || actual_type != XA_ATOM) | ||
| 2304 | ? PropModeReplace : PropModeAppend), | 2305 | ? PropModeReplace : PropModeAppend), |
| 2305 | (unsigned char *) &atom, 1); | 2306 | (unsigned char *) &atom, 1); |
| 2306 | 2307 | ||