~ubuntu-branches/debian/jessie/xserver-xorg-video-intel/jessie

« back to all changes in this revision

Viewing changes to debian/patches/0003-Avoid-calling-xf86nameCompare-with-a-NULL-pointer.patch

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois
  • Date: 2012-06-12 20:30:51 UTC
  • mfrom: (26.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20120612203051-mex5136iqfafp06b
Tags: 2:2.19.0-3
* Add patch to avoid X segfaults with Driver-less Device sections in
  xorg.conf (Closes: #677206):
  - 0003-Avoid-calling-xf86nameCompare-with-a-NULL-pointer.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From 0de44dd7d7cbd5307afce2245ffbdc748e868223 Mon Sep 17 00:00:00 2001
 
2
From: Cyril Brulebois <kibi@debian.org>
 
3
Date: Tue, 12 Jun 2012 20:00:10 +0200
 
4
Subject: [PATCH] Avoid calling xf86nameCompare() with a NULL pointer.
 
5
 
 
6
Device sections without a Driver property would lead to a server
 
7
segfault because of a NULL pointer's being passed as the second
 
8
argument of xf86nameCompare().
 
9
 
 
10
Debian bug #677206 <http://bugs.debian.org/677206>
 
11
 
 
12
Signed-off-by: Cyril Brulebois <kibi@debian.org>
 
13
---
 
14
 src/intel_module.c |    2 +-
 
15
 1 file changed, 1 insertion(+), 1 deletion(-)
 
16
 
 
17
diff --git a/src/intel_module.c b/src/intel_module.c
 
18
index 4430ac6..fa78b59 100644
 
19
--- a/src/intel_module.c
 
20
+++ b/src/intel_module.c
 
21
@@ -299,7 +299,7 @@ static XF86ConfDevicePtr
 
22
 _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
 
23
 {
 
24
        while (p) {
 
25
-               if (xf86nameCompare(ident, p->dev_driver) == 0)
 
26
+               if (p->dev_driver && xf86nameCompare(ident, p->dev_driver) == 0)
 
27
                        return p;
 
28
 
 
29
                p = p->list.next;
 
30
-- 
 
31
1.7.10
 
32