From b6ba595862a55e5e2899d4c38dd22a1f8ffcabaa Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Fri, 29 Jan 2021 19:00:17 -0500 Subject: xwayland/selection: destroy all selections on Xwayland restart Previously, Xwayland could restart, and we'd get events for transfers pointing to the previous (now freed) xwm instance. This led to use-after-free segfaults. Closes #2565. --- include/xwayland/selection.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/xwayland') diff --git a/include/xwayland/selection.h b/include/xwayland/selection.h index 5e65e8bb..3f00fd54 100644 --- a/include/xwayland/selection.h +++ b/include/xwayland/selection.h @@ -51,6 +51,9 @@ void xwm_selection_transfer_finish(struct wlr_xwm_selection_transfer *transfer); bool xwm_selection_transfer_get_selection_property( struct wlr_xwm_selection_transfer *transfer, bool delete); +void xwm_selection_transfer_destroy_outgoing( + struct wlr_xwm_selection_transfer *transfer); + xcb_atom_t xwm_mime_type_to_atom(struct wlr_xwm *xwm, char *mime_type); char *xwm_mime_type_from_atom(struct wlr_xwm *xwm, xcb_atom_t atom); struct wlr_xwm_selection *xwm_get_selection(struct wlr_xwm *xwm, -- cgit v1.2.3