summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-07-03 19:42:26 +0100
committerJeremy Huddleston <jeremyhu@apple.com>2011-03-04 13:51:20 -0800
commit457728d723a7d93cd88691dd920bf42a7540616a (patch)
treef49ea881826c2c5e0ab11a16b59b1543bf4c86a1
parent8a18d18bb31933d8dd0fe63cd293d7ae6711abcc (diff)
glx: make sure screen is non-negative in validGlxScreen
Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Julien Cristau <jcristau@debian.org> (cherry picked from commit 3f0d3f4d97bce75c1828635c322b6560a45a037f)
-rw-r--r--glx/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
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;