All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] obexd/client/map: Check msg value is valid
@ 2014-09-15 12:59 Gowtham Anandha Babu
  2014-09-15 13:03 ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Gowtham Anandha Babu @ 2014-09-15 12:59 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: luiz.dentz, d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu

Checks for the NULL msg-value, before passing it to the callback.
---
 obexd/client/map.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/obexd/client/map.c b/obexd/client/map.c
index 520e492..fb8ebd8 100644
--- a/obexd/client/map.c
+++ b/obexd/client/map.c
@@ -1132,7 +1132,8 @@ static void msg_element(GMarkupParseContext *ctxt, const char *element,
 
 		for (parser = msg_parsers; parser && parser->name; parser++) {
 			if (strcasecmp(key, parser->name) == 0) {
-				parser->func(msg, values[i]);
+				if(values[i])
+					parser->func(msg, values[i]);
 				break;
 			}
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] obexd/client/map: Check msg value is valid
  2014-09-15 12:59 [PATCH] obexd/client/map: Check msg value is valid Gowtham Anandha Babu
@ 2014-09-15 13:03 ` Luiz Augusto von Dentz
  2014-09-16  5:13   ` Gowtham Anandha Babu
  0 siblings, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2014-09-15 13:03 UTC (permalink / raw)
  To: Gowtham Anandha Babu; +Cc: linux-bluetooth, Dmitry Kasatkin, Bharat Panda, cpgs

Hi,

On Mon, Sep 15, 2014 at 3:59 PM, Gowtham Anandha Babu
<gowtham.ab@samsung.com> wrote:
> Checks for the NULL msg-value, before passing it to the callback.
> ---
>  obexd/client/map.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/obexd/client/map.c b/obexd/client/map.c
> index 520e492..fb8ebd8 100644
> --- a/obexd/client/map.c
> +++ b/obexd/client/map.c
> @@ -1132,7 +1132,8 @@ static void msg_element(GMarkupParseContext *ctxt, const char *element,
>
>                 for (parser = msg_parsers; parser && parser->name; parser++) {
>                         if (strcasecmp(key, parser->name) == 0) {
> -                               parser->func(msg, values[i]);
> +                               if(values[i])
> +                                       parser->func(msg, values[i]);
>                                 break;
>                         }
>                 }
> --
> 1.9.1

Ive just pushed a similar patch, but thanks anyway.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] obexd/client/map: Check msg value is valid
  2014-09-15 13:03 ` Luiz Augusto von Dentz
@ 2014-09-16  5:13   ` Gowtham Anandha Babu
  2014-09-16  7:21     ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 4+ messages in thread
From: Gowtham Anandha Babu @ 2014-09-16  5:13 UTC (permalink / raw)
  To: 'Luiz Augusto von Dentz'
  Cc: linux-bluetooth, 'Dmitry Kasatkin', 'Bharat Panda', cpgs

Hi Luiz,

> -----Original Message-----
> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
> Sent: Monday, September 15, 2014 6:34 PM
> To: Gowtham Anandha Babu
> Cc: linux-bluetooth@vger.kernel.org; Dmitry Kasatkin; Bharat Panda;
> cpgs@samsung.com
> Subject: Re: [PATCH] obexd/client/map: Check msg value is valid
> 
> Hi,
> 
> On Mon, Sep 15, 2014 at 3:59 PM, Gowtham Anandha Babu
> <gowtham.ab@samsung.com> wrote:
> > Checks for the NULL msg-value, before passing it to the callback.
> > ---
> >  obexd/client/map.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/obexd/client/map.c b/obexd/client/map.c index
> > 520e492..fb8ebd8 100644
> > --- a/obexd/client/map.c
> > +++ b/obexd/client/map.c
> > @@ -1132,7 +1132,8 @@ static void msg_element(GMarkupParseContext
> > *ctxt, const char *element,
> >
> >                 for (parser = msg_parsers; parser && parser->name; parser++) {
> >                         if (strcasecmp(key, parser->name) == 0) {
> > -                               parser->func(msg, values[i]);
> > +                               if(values[i])
> > +                                       parser->func(msg, values[i]);
> >                                 break;
> >                         }
> >                 }
> > --
> > 1.9.1
> 
> Ive just pushed a similar patch, but thanks anyway.
> 
> 
> --
> Luiz Augusto von Dentz

Sorry If I am wrong, This patch is under obexd/client/map. The patch which you pushed recently is under obexd/client/mns. 

Regards,
Gowtham


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] obexd/client/map: Check msg value is valid
  2014-09-16  5:13   ` Gowtham Anandha Babu
@ 2014-09-16  7:21     ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2014-09-16  7:21 UTC (permalink / raw)
  To: Gowtham Anandha Babu; +Cc: linux-bluetooth, Dmitry Kasatkin, Bharat Panda, cpgs

Hi,

On Tue, Sep 16, 2014 at 8:13 AM, Gowtham Anandha Babu
<gowtham.ab@samsung.com> wrote:
> Hi Luiz,
>
>> -----Original Message-----
>> From: Luiz Augusto von Dentz [mailto:luiz.dentz@gmail.com]
>> Sent: Monday, September 15, 2014 6:34 PM
>> To: Gowtham Anandha Babu
>> Cc: linux-bluetooth@vger.kernel.org; Dmitry Kasatkin; Bharat Panda;
>> cpgs@samsung.com
>> Subject: Re: [PATCH] obexd/client/map: Check msg value is valid
>>
>> Hi,
>>
>> On Mon, Sep 15, 2014 at 3:59 PM, Gowtham Anandha Babu
>> <gowtham.ab@samsung.com> wrote:
>> > Checks for the NULL msg-value, before passing it to the callback.
>> > ---
>> >  obexd/client/map.c | 3 ++-
>> >  1 file changed, 2 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/obexd/client/map.c b/obexd/client/map.c index
>> > 520e492..fb8ebd8 100644
>> > --- a/obexd/client/map.c
>> > +++ b/obexd/client/map.c
>> > @@ -1132,7 +1132,8 @@ static void msg_element(GMarkupParseContext
>> > *ctxt, const char *element,
>> >
>> >                 for (parser = msg_parsers; parser && parser->name; parser++) {
>> >                         if (strcasecmp(key, parser->name) == 0) {
>> > -                               parser->func(msg, values[i]);
>> > +                               if(values[i])
>> > +                                       parser->func(msg, values[i]);
>> >                                 break;
>> >                         }
>> >                 }
>> > --
>> > 1.9.1
>>
>> Ive just pushed a similar patch, but thanks anyway.
>>
>>
>> --
>> Luiz Augusto von Dentz
>
> Sorry If I am wrong, This patch is under obexd/client/map. The patch which you pushed recently is under obexd/client/mns.

Ive pushed this after fixing the coding style and the commit message, thanks.


-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-16  7:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-15 12:59 [PATCH] obexd/client/map: Check msg value is valid Gowtham Anandha Babu
2014-09-15 13:03 ` Luiz Augusto von Dentz
2014-09-16  5:13   ` Gowtham Anandha Babu
2014-09-16  7:21     ` Luiz Augusto von Dentz

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.