summaryrefslogtreecommitdiff
authorJulien Cristau <jcristau@debian.org>2010-07-03 18:42:26 (GMT)
committer Julien Cristau <jcristau@debian.org>2011-01-10 14:31:12 (GMT)
commit3f0d3f4d97bce75c1828635c322b6560a45a037f (patch) (side-by-side diff)
treee041c5c197f89b9b5ab3242c6a2bbbf877bcfd83
parent6358a60065eef167d4e5f4afd981ff26deeba80d (diff)
downloadxserver-3f0d3f4d97bce75c1828635c322b6560a45a037f.zip
xserver-3f0d3f4d97bce75c1828635c322b6560a45a037f.tar.gz
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 (more/less context) (ignore whitespace changes)
-rw-r--r--glx/glxcmds.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/glx/glxcmds.c b/glx/glxcmds.c
index de9c3f0..419cc46 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;