xf86-video-intel: src/intel_module.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Jun 12 13:18:00 PDT 2012


 src/intel_module.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 224d631a232d3536e0f1f2780bfbe1218ee7590f
Author: Cyril Brulebois <kibi at debian.org>
Date:   Tue Jun 12 21:14:53 2012 +0100

    Avoid calling xf86nameCompare() with a NULL string
    
    Device sections without a Driver property would lead to a server
    segfault because of a NULL pointer's being passed as the second
    argument of xf86nameCompare().
    
    Debian bug #677206 <http://bugs.debian.org/677206>
    
    Signed-off-by: Cyril Brulebois <kibi at debian.org>

diff --git a/src/intel_module.c b/src/intel_module.c
index 4430ac6..d6b4eb9 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -298,12 +298,16 @@ extern XF86ConfigPtr xf86configptr;
 static XF86ConfDevicePtr
 _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
 {
+	if (p->dev_driver == NULL)
+		return NULL;
+
 	while (p) {
 		if (xf86nameCompare(ident, p->dev_driver) == 0)
 			return p;
 
 		p = p->list.next;
 	}
+
 	return NULL;
 }
 


More information about the xorg-commit mailing list