]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/xserver.git/blob - debian/patches/229_randr_first_check_pScrPriv_before_using_the_pointer.patch
Merge branch 'ubuntu'
[glsdk/xserver.git] / debian / patches / 229_randr_first_check_pScrPriv_before_using_the_pointer.patch
1 From 32603f57ca03b6390b109960f8bb5ea53ac95ecb Mon Sep 17 00:00:00 2001
2 From: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
3 Date: Thu, 21 Jun 2012 00:55:53 -0300
4 Subject: [PATCH] randr: first check pScrPriv before using the pointer at
5  RRFirstOutput
7 Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo,
8 which later calls RRFirstOutput.
10 Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
11 Reviewed-by: Keith Packard <keithp@keithp.com>
12 Signed-off-by: Keith Packard <keithp@keithp.com>
13 ---
14  randr/randr.c |    3 +++
15  1 file changed, 3 insertions(+)
17 Index: xorg-server-1.11.4/randr/randr.c
18 ===================================================================
19 --- xorg-server-1.11.4.orig/randr/randr.c       2012-07-17 18:46:06.000000000 -0300
20 +++ xorg-server-1.11.4/randr/randr.c    2012-07-17 18:48:35.169824448 -0300
21 @@ -454,6 +454,9 @@
22      rrScrPriv(pScreen);
23      RROutputPtr                    output;
24      int        i, j;
25 +
26 +    if (!pScrPriv)
27 +        return NULL;
28      
29      if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
30         return pScrPriv->primaryOutput;