From 37280d7888001a613640b7d005f4482e7d886c47 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 10 Nov 2003 05:09:10 +0000 Subject: Make sure _XROOTPMAP_ID property is right type, format and length before attempting to use the resulting value. --- ChangeLog | 6 ++++++ xcompmgr.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 45faea4..cb4adb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-09 Keith Packard + + * xcompmgr.c: (root_tile): + Make sure _XROOTPMAP_ID property is right type, format and length + before attempting to use the resulting value. + 2003-11-09 Keith Packard * xcompmgr.c: (configure_win): diff --git a/xcompmgr.c b/xcompmgr.c index 16260b4..7b55eae 100644 --- a/xcompmgr.c +++ b/xcompmgr.c @@ -328,7 +328,8 @@ root_tile (Display *dpy) if (XGetWindowProperty (dpy, root, XInternAtom (dpy, "_XROOTPMAP_ID", False), 0, 4, False, AnyPropertyType, - &actual_type, &actual_format, &nitems, &bytes_after, &prop) == Success) + &actual_type, &actual_format, &nitems, &bytes_after, &prop) == Success && + actual_type == XInternAtom (dpy, "PIXMAP", False) && actual_format == 32 && nitems == 1) { memcpy (&pixmap, prop, 4); XFree (prop); -- cgit v1.2.3