]> source.dussan.org Git - tigervnc.git/blob
2b43e2a29b5d956368cbb0b7e01e1882e1b5cfcf
[tigervnc.git] /
1 From: Julien Cristau <jcristau@debian.org>
2 Date: Sat Jul 3 19:42:26 2010 +0100
3 Subject: [PATCH] glx: make sure screen is non-negative in validGlxScreen
4 Patch-Mainline: Upstream
5 Git-commit: 3f0d3f4d97bce75c1828635c322b6560a45a037f
6 References: bnc #648278, CVE-2010-4818
7 Signed-off-by: Egbert Eich <eich@suse.de>
8
9 Reviewed-by: Adam Jackson <ajax@redhat.com>
10 Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
11 Reviewed-by: Daniel Stone <daniel@fooishbar.org>
12 Signed-off-by: Julien Cristau <jcristau@debian.org>
13 ---
14  glx/glxcmds.c |    2 +-
15  1 file changed, 1 insertion(+), 1 deletion(-)
16
17 --- xorg-server-1.6.5.orig/glx/glxcmds.c
18 +++ xorg-server-1.6.5/glx/glxcmds.c
19 @@ -65,7 +65,7 @@ validGlxScreen(ClientPtr client, int scr
20      /*
21      ** Check if screen exists.
22      */
23 -    if (screen >= screenInfo.numScreens) {
24 +    if (screen < 0 || screen >= screenInfo.numScreens) {
25         client->errorValue = screen;
26         *err = BadValue;
27         return FALSE;