mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Cerrato Renaud <r.cerrato@til-technologies.fr>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 4/5] gadget: possible null pointer dereference fix
Date: Thu, 14 Mar 2013 11:01:31 +0100	[thread overview]
Message-ID: <51419FFB.1070608@til-technologies.fr> (raw)
In-Reply-To: <20130314073541.GC1906@pengutronix.de>

For some reasons relative to my company , I'm not able to send emails 
using git-send-email. I gave up.
Thanks.

On jeudi 14 mars 2013 08:35:41, Sascha Hauer wrote:
> On Wed, Mar 13, 2013 at 02:44:39PM +0100, Cerrato Renaud wrote:
>> This patch fix a possible null pointer dereference exception because of a missing null check on cdev->config
>>
>> Signed-off-by: Cerrato Renaud <r.cerrato@til-technologies.fr>
>> ---
>>  drivers/usb/gadget/composite.c |   23 +++++++++++++----------
>>  1 files changed, 13 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
>> index 9af115e..1f6c5b2 100644
>> --- a/drivers/usb/gadget/composite.c
>> +++ b/drivers/usb/gadget/composite.c
>> @@ -777,18 +777,21 @@ unknown:
>>           * recipients (endpoint, other, WUSB, ...) to the current
>>           * configuration code.
>>           */
>> -        f = cdev->config->interface[intf];
>> -        if (f && f->setup)
>> -            value = f->setup(f, ctrl);
>> -        else
>> -            f = NULL;
>> +        if(cdev->config) {
>
> please do a:
>
> 	if (!cdev->config)
> 		goto out;
>
> instead.
>
> Your patch is whitespace damaged, I won't be able to apply it.
> As Jean-Christophe mentioned, you should use git-send-mail for sending
> your patches. It does things just right.
>
> Sascha
>




_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-14 10:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-13 13:44 Cerrato Renaud
2013-03-14  7:35 ` Sascha Hauer
2013-03-14 10:01   ` Cerrato Renaud [this message]
2013-03-14 10:34     ` Sascha Hauer

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=51419FFB.1070608@til-technologies.fr \
    --to=r.cerrato@til-technologies.fr \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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