nx-libs
nx-libs copied to clipboard
Check clipboard TEXT handling
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. UTF8_STRING), 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.