Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix missing NUL terminator in X11 WM_CLASS (#62848)
david lee5dd0666dfb62
diff --git a/crates/gpui_linux/src/linux/x11/window.rs b/crates/gpui_linux/src/linux/x11/window.rsindex f9423a38ee5..d6db24e2e0b 100644--- a/crates/gpui_linux/src/linux/x11/window.rs+++ b/crates/gpui_linux/src/linux/x11/window.rs@@ -1568,10 +1568,11 @@ impl PlatformWindow for X11Window {}fn set_app_id(&mut self, app_id: &str) {- let mut data = Vec::with_capacity(app_id.len() * 2 + 1);+ let mut data = Vec::with_capacity(app_id.len() * 2 + 2);data.extend(app_id.bytes()); // instance https://unix.stackexchange.com/a/494170data.push(b'\0');data.extend(app_id.bytes()); // class+ data.push(b'\0');check_reply(|| "X11 ChangeProperty8 for WM_CLASS failed.",