aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/Xext/cup.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/Xext/cup.c')
-rw-r--r--nx-X11/programs/Xserver/Xext/cup.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/Xext/cup.c b/nx-X11/programs/Xserver/Xext/cup.c
index 4db62cf15..198aa801f 100644
--- a/nx-X11/programs/Xserver/Xext/cup.c
+++ b/nx-X11/programs/Xserver/Xext/cup.c
@@ -202,6 +202,9 @@ int ProcGetReservedColormapEntries(
REQUEST_SIZE_MATCH (xXcupGetReservedColormapEntriesReq);
+ if (stuff->screen >= screenInfo.numScreens)
+ return BadValue;
+
#ifndef HAVE_SPECIAL_DESKTOP_COLORS
citems[CUP_BLACK_PIXEL].pixel =
screenInfo.screens[stuff->screen]->blackPixel;