diff options
author | Cyril Brulebois <kibi@debian.org> | 2012-06-12 21:14:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-12 21:14:53 +0100 |
commit | 224d631a232d3536e0f1f2780bfbe1218ee7590f (patch) | |
tree | ef2d986d8137ae2b6fefcbbcc270646e20d5622c /src/intel_module.c | |
parent | 3b9b64c7c9b5b0bfaafb97c9a9fe5849bbb412da (diff) |
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@debian.org>
Diffstat (limited to 'src/intel_module.c')
-rw-r--r-- | src/intel_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/intel_module.c b/src/intel_module.c index 4430ac6a..d6b4eb93 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; } |