From: Cyril Brulebois <kibi@debian.org>
To: intel-gfx@lists.freedesktop.org
Cc: Cyril Brulebois <kibi@debian.org>
Subject: [PATCH] Avoid calling xf86nameCompare() with a NULL pointer.
Date: Tue, 12 Jun 2012 20:15:19 +0200 [thread overview]
Message-ID: <1339524919-22493-1-git-send-email-kibi@debian.org> (raw)
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>
---
src/intel_module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel_module.c b/src/intel_module.c
index 4430ac6..fa78b59 100644
--- a/src/intel_module.c
+++ b/src/intel_module.c
@@ -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;
--
1.7.10
next reply other threads:[~2012-06-12 18:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 18:15 Cyril Brulebois [this message]
2012-06-12 20:18 ` [PATCH] Avoid calling xf86nameCompare() with a NULL pointer Chris Wilson
2012-06-12 20:30 ` Cyril Brulebois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339524919-22493-1-git-send-email-kibi@debian.org \
--to=kibi@debian.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.