diff options
author | Julien Cristau <jcristau@debian.org> | 2010-07-03 19:42:26 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2011-01-10 15:31:12 +0100 |
commit | 3f0d3f4d97bce75c1828635c322b6560a45a037f (patch) | |
tree | e041c5c197f89b9b5ab3242c6a2bbbf877bcfd83 | |
parent | 6358a60065eef167d4e5f4afd981ff26deeba80d (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>
-rw-r--r-- | glx/glxcmds.c | 2 |
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) | |||
56 | /* | 56 | /* |
57 | ** Check if screen exists. | 57 | ** Check if screen exists. |
58 | */ | 58 | */ |
59 | if (screen >= screenInfo.numScreens) { | 59 | if (screen < 0 || screen >= screenInfo.numScreens) { |
60 | client->errorValue = screen; | 60 | client->errorValue = screen; |
61 | *err = BadValue; | 61 | *err = BadValue; |
62 | return FALSE; | 62 | return FALSE; |