summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-07-03 19:42:26 +0100
committerJulien Cristau <jcristau@debian.org>2011-02-15 16:05:03 +0100
commit01bc98e313b8ee62c506d0f8f408d54b71d1dfa6 (patch)
tree00d5d08da3a5b178ef974dd265f66078a9b66250
parentd77ffa918b2aaa3ca1deb17ed0145199d0f863da (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 b1061a8c2..3eae1aac7 100644
--- a/glx/glxcmds.c
+++ b/glx/glxcmds.c
@@ -58,7 +58,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;