Skip to contentSkip to conversation

Avoid calling xf86nameCompare() with a NULL pointer.

PATCH In review Cyril Brulebois 2 participants 3 messages Jun 12, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Avoid calling xf86nameCompare() with a NULL pointer.

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>

---
 src/intel_module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/intel_module.c +1 -1
index 4430ac6..fa78b59 100644
@@ -299,7 +299,7 @@ static XF86ConfDevicePtr
 _xf86findDriver(const char *ident, XF86ConfDevicePtr p)
 {
 	while (p) {
-		if (xf86nameCompare(ident, p->dev_driver) == 0)
+		if (p->dev_driver && xf86nameCompare(ident, p->dev_driver) == 0)
 			return p;
 
 		p = p->list.next;
Signature · 1 line
1.7.10
#1 lore raw
Quoted 7 lines · Cyril Brulebois

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>

Pushed with only a slightly different colour of paint. Thanks, -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre