summaryrefslogtreecommitdiff
path: root/glx/glxcmds.c
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-07-03 19:42:26 +0100
committerJulien Cristau <jcristau@debian.org>2011-01-10 15:31:12 +0100
commit3f0d3f4d97bce75c1828635c322b6560a45a037f (patch)
treee041c5c197f89b9b5ab3242c6a2bbbf877bcfd83 /glx/glxcmds.c
parent6358a60065eef167d4e5f4afd981ff26deeba80d (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>
Diffstat (limited to 'glx/glxcmds.c')
-rw-r--r--glx/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index de9c3f039..419cc4626 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -56,7 +56,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;