Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gui-daemon/xside.c
Original file line number Diff line number Diff line change
Expand Up @@ -3068,8 +3068,15 @@ static void handle_wmname(Ghandles * g, struct windowdata *vm_window)
read_struct(g->vchan, untrusted_msg);
/* sanitize start */
untrusted_msg.data[sizeof(untrusted_msg.data) - 1] = 0;
// If the agent has changed the end of very long title to U+2026 but utf8 is disabled
if (!g->allow_utf8_titles
&& strlen(untrusted_msg.data) > 3
&& strcmp(untrusted_msg.data + strlen(untrusted_msg.data) - 3, "\xE2\x80\xA6") == 0) {
strcpy(untrusted_msg.data + strlen(untrusted_msg.data) - 3, "...");
}
sanitize_string_from_vm((unsigned char *) (untrusted_msg.data),
g->allow_utf8_titles);

if (g->prefix_titles)
snprintf(buf, sizeof(buf), "[%s] %s", g->vmname, untrusted_msg.data);
else
Expand Down