From 03eda3d567e017b0a3a7dba276106955da1205d9 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sat, 3 Jul 2010 19:42:26 +0100 Subject: [PATCH 1/3] glx: make sure screen is non-negative in validGlxScreen --- glx/glxcmds.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 9e5b213..1756029 100644 --- a/glx/glxcmds.c +++ b/glx/glxcmds.c @@ -57,7 +57,7 @@ validGlxScreen(ClientPtr client, int screen, __GLXscreen **pGlxScreen, int *err) /* ** Check if screen exists. */ - if (screen >= screenInfo.numScreens) { + if (screen < 0 || screen >= screenInfo.numScreens) { client->errorValue = screen; *err = BadValue; return FALSE; -- 1.7.1