From: Wolfgang Grandegger <wg@grandegger.com>
To: Wolfram Sang <w.sang@pengutronix.de>
Cc: socketcan-core@lists.berlios.de, netdev@vger.kernel.org,
David Miller <davem@davemloft.net>,
linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] net/can: add driver for mscan family & mpc52xx_mscan
Date: Tue, 17 Nov 2009 20:17:55 +0100 [thread overview]
Message-ID: <4B02F6E3.6000503@grandegger.com> (raw)
In-Reply-To: <4B02EABA.3060905@grandegger.com>
Wolfgang Grandegger wrote:
> Wolfram Sang wrote:
>> Hi Grant,
>>
>> Wolfgang commented on some points already, I will pick up the other remarks,
>> just one question:
>>
>>>> + clk_src = of_get_property(np, "fsl,mscan-clk-src", NULL);
>>>> + if (clk_src && strcmp(clk_src, "ip") == 0)
>>> Should protect against non-null. strncmp() maybe?
>> "ip" is null-terminated, or what do you mean?
>
> Imagine somebody defines:
>
> fsl,mscan-clk-src = <0xbaeee>;
Forget my comment. I will not harm in the above case. I was just worried
about non-null-teminated strings.
Wolfgang.
WARNING: multiple messages have this Message-ID (diff)
From: Wolfgang Grandegger <wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
To: Wolfram Sang <w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Grant Likely
<grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>,
socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
linuxppc-dev-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH] net/can: add driver for mscan family & mpc52xx_mscan
Date: Tue, 17 Nov 2009 20:17:55 +0100 [thread overview]
Message-ID: <4B02F6E3.6000503@grandegger.com> (raw)
In-Reply-To: <4B02EABA.3060905-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
Wolfgang Grandegger wrote:
> Wolfram Sang wrote:
>> Hi Grant,
>>
>> Wolfgang commented on some points already, I will pick up the other remarks,
>> just one question:
>>
>>>> + clk_src = of_get_property(np, "fsl,mscan-clk-src", NULL);
>>>> + if (clk_src && strcmp(clk_src, "ip") == 0)
>>> Should protect against non-null. strncmp() maybe?
>> "ip" is null-terminated, or what do you mean?
>
> Imagine somebody defines:
>
> fsl,mscan-clk-src = <0xbaeee>;
Forget my comment. I will not harm in the above case. I was just worried
about non-null-teminated strings.
Wolfgang.
next prev parent reply other threads:[~2009-11-18 0:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 16:14 [PATCH] net/can: add driver for mscan family & mpc52xx_mscan Wolfram Sang
2009-11-13 16:14 ` Wolfram Sang
2009-11-13 17:39 ` Grant Likely
2009-11-13 17:39 ` Grant Likely
2009-11-16 8:40 ` Wolfgang Grandegger
2009-11-16 18:44 ` Wolfram Sang
2009-11-16 18:44 ` Wolfram Sang
2009-11-17 18:26 ` Wolfgang Grandegger
2009-11-17 18:26 ` Wolfgang Grandegger
2009-11-17 19:17 ` Wolfgang Grandegger [this message]
2009-11-17 19:17 ` Wolfgang Grandegger
2009-11-14 4:51 ` David Miller
2009-11-14 4:51 ` David Miller
2009-11-15 11:55 ` Wolfgang Grandegger
2009-11-15 11:55 ` Wolfgang Grandegger
2009-11-16 10:12 ` Wolfram Sang
2009-11-16 10:12 ` Wolfram Sang
2009-11-16 10:21 ` David Miller
2009-11-16 10:21 ` David Miller
2009-11-16 8:44 ` Wolfgang Grandegger
2009-11-16 8:44 ` Wolfgang Grandegger
2009-11-16 10:24 ` Wolfram Sang
2009-11-16 10:24 ` Wolfram Sang
2009-11-16 13:08 ` Wolfgang Grandegger
2009-11-16 13:08 ` Wolfgang Grandegger
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=4B02F6E3.6000503@grandegger.com \
--to=wg@grandegger.com \
--cc=davem@davemloft.net \
--cc=linuxppc-dev@ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=socketcan-core@lists.berlios.de \
--cc=w.sang@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 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.