ac5c859
diff -up xorg-server-1.1.1/Xext/cup.c.jx xorg-server-1.1.1/Xext/cup.c
ac5c859
--- xorg-server-1.1.1/Xext/cup.c.jx	2006-07-05 14:31:36.000000000 -0400
ac5c859
+++ xorg-server-1.1.1/Xext/cup.c	2007-12-11 14:28:37.000000000 -0500
ac5c859
@@ -198,6 +198,9 @@ int ProcGetReservedColormapEntries(
ac5c859
 
ac5c859
     REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq);
ac5c859
 
ac5c859
+    if (stuff->screen >= screenInfo.numScreens)
ac5c859
+	return BadValue;
ac5c859
+
ac5c859
 #ifndef HAVE_SPECIAL_DESKTOP_COLORS
ac5c859
     citems[CUP_BLACK_PIXEL].pixel = 
ac5c859
 	screenInfo.screens[stuff->screen]->blackPixel;