A wl_buffer has a max size of 4096 bytes, of which 8 are needed for the header and another 4 for the string argument length (in this case), so make sure the we only save the first 4083 bytes that are still valid UTF8.
https://bugzilla.gnome.org/show_bug.cgi?id=767241
d9a6517 wayland: Make sure window titles fit into a wl_buffer
gdk/wayland/gdkwindow-wayland.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
Upstream: git.gnome.org