From 457728d723a7d93cd88691dd920bf42a7540616a Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sat, 3 Jul 2010 19:42:26 +0100 Subject: glx: make sure screen is non-negative in validGlxScreen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Adam Jackson Reviewed-by: Kristian Høgsberg Reviewed-by: Daniel Stone Signed-off-by: Julien Cristau (cherry picked from commit 3f0d3f4d97bce75c1828635c322b6560a45a037f) --- glx/glxcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glx/glxcmds.c b/glx/glxcmds.c index 8d13c1509..9e32d6c2f 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; -- cgit v1.2.3