From cfd2e6ff32e8dc27575b930dd2416c4832904874 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 10 Feb 2022 13:35:19 +1100 Subject: [PATCH] [client] x11: check if the EWMH atoms exist before using them --- client/displayservers/X11/x11.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/displayservers/X11/x11.c b/client/displayservers/X11/x11.c index f88d6782..55a3e5c3 100644 --- a/client/displayservers/X11/x11.c +++ b/client/displayservers/X11/x11.c @@ -195,6 +195,10 @@ static void x11CheckEWMHSupport(void) Window * windowFromRoot = (Window *)data; + if (!x11atoms._NET_SUPPORTING_WM_CHECK || !x11atoms._NET_SUPPORTED || + !x11atoms._NET_WM_NAME) + goto out_root; + if (XGetWindowProperty(x11.display, *windowFromRoot, x11atoms._NET_SUPPORTING_WM_CHECK, 0, ~0L, False, XA_WINDOW, &type, &fmt, &num, &bytes, &data) != Success)