public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Frieder Buerzele <evermind@tuxfamily.org>
To: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH] Fix segfault: If the interface name is NULL the bluetoothd daemon will crash
Date: Thu, 26 Feb 2009 09:35:05 +0100	[thread overview]
Message-ID: <1235637306-15025-1-git-send-email-evermind@tuxfamily.org> (raw)

Hi Frieder,

> > ---
> >  gdbus/object.c |   11 ++++++-----
> >  1 files changed, 6 insertions(+), 5 deletions(-)
> > 
> > diff --git a/gdbus/object.c b/gdbus/object.c
> > index 0786aeb..d920eac 100644
> > --- a/gdbus/object.c
> > +++ b/gdbus/object.c
> > @@ -224,11 +224,12 @@ static struct interface_data
> > *find_interface(GSList *interfaces,
> >  {
> >  	GSList *list;
> >  
> > -	for (list = interfaces; list; list = list->next) {
> > -		struct interface_data *iface = list->data;
> > -		if (!strcmp(name, iface->name))
> > -			return iface;
> > -	}
> > +	if (name)
> > +		for (list = interfaces; list; list = list->next) {
> > +			struct interface_data *iface = list->data;
> > +			if (!strcmp(name, iface->name))
> > +				return iface;
> > +		}
> >  
> >  	return NULL;
> >  }
> 
> what about something like this:
> 
> 	if (name == NULL)
> 			return NULL;
> 
> 			Regards
> 
> 			Marcel
> 

k, I'll resend a updated patch

Greetz Frieder


             reply	other threads:[~2009-02-26  8:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26  8:35 Frieder Buerzele [this message]
2009-02-26  8:35 ` [PATCH] Fix segfault: If the interface name is NULL the bluetoothd daemon will crash Frieder Buerzele
  -- strict thread matches above, loose matches on Subject: below --
2009-02-26  8:46 Frieder Buerzele
2009-02-26  8:46 ` Frieder Buerzele
2009-02-28 21:46   ` Marcel Holtmann
2009-02-25 11:56 evermind
2009-02-25 14:13 ` Marcel Holtmann

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=1235637306-15025-1-git-send-email-evermind@tuxfamily.org \
    --to=evermind@tuxfamily.org \
    --cc=linux-bluetooth@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox