Make sure _XROOTPMAP_ID property is right type, format and length before
authorKeith Packard <keithp@keithp.com>
Mon, 10 Nov 2003 05:09:10 +0000 (05:09 +0000)
committerKeith Packard <keithp@keithp.com>
Mon, 10 Nov 2003 05:09:10 +0000 (05:09 +0000)
    attempting to use the resulting value.

ChangeLog
xcompmgr.c

index 45faea44d13c6eb070b04e6c22c6809da9f1769b..cb4adb96b9c156c2878a37faa62c4d8326ca8579 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-11-09  Keith Packard  <keithp@keithp.com>
+
+       * 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  <keithp@keithp.com>
 
        * xcompmgr.c: (configure_win):
index 16260b43f9b2aae89a989594aff8f7a46c832d4d..7b55eae675fc8ae93195a63370d8fc1a01c147a7 100644 (file)
@@ -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);