1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-26 07:33:47 +00:00

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.
This commit is contained in:
Po Lu 2022-06-19 13:32:27 +08:00
parent 6d0148c541
commit 823b503c9d

View File

@ -2299,8 +2299,9 @@ xm_get_drag_atom_1 (struct x_display_info *dpyinfo,
XChangeProperty (dpyinfo->display, dpyinfo->root_window,
dpyinfo->Xatom_EMACS_DRAG_ATOM, XA_ATOM, 32,
(rc == Success && (actual_format != 32
|| actual_type != XA_ATOM)
(rc != Success
|| (actual_format != 32
|| actual_type != XA_ATOM)
? PropModeReplace : PropModeAppend),
(unsigned char *) &atom, 1);