ArcticaProject / nx-libs

nx-libs
Other
119 stars 39 forks source link

Check clipboard TEXT handling #1031

Open uli42 opened 2 years ago

uli42 commented 2 years ago

I read an interesting blog post about Xwayland stuff (see https://roscidus.com/blog/blog/2021/10/30/xwayland/) and came across this section:

_A strange problem I had was that, while pasting into GVim worked fine, xterm would segfault shortly after trying to paste into it. This turned out to be a bug in the way I was sending the notifications. If an X11 application requests the special TEXT target, it means that the sender should choose the exact format. You write the property with the chosen type (e.g. UTF8STRING), but you must still send the notification with the target TEXT. xterm is a C application (thankfully no longer set-uid!) and seems to have a use-after-free bug in the timeout code.

We need to check if the clipboard code is handling the TEXT case correctly - which I doubt.