On Tue, 2014-07-29 at 14:15 +0200, Rickard Strandqvist wrote:
> Den 29 jul 2014 04:40 skrev "Stephen Hemminger" <step...@networkplumber.org
> >:
> >
> > On Sat, 26 Jul 2014 16:24:36 +0200
> > Rickard Strandqvist <rickard_strandqv...@spectrumdigital.se> wrote:
> >
> > > Replacing strncpy with strlcpy to avoid strings that lacks null
> terminate.
> > >
> > > Signed-off-by: Rickard Strandqvist <
> rickard_strandqv...@spectrumdigital.se>
> > > ---
> >                            hw->mac.type, hw->phy.type, hw->phy.sfp_type,
> >
> > This patch doesn't change anything.
> > Netdev is already zeroed when allocated therefore doing strncpy()
> guarantees
> > it will be null terminated.
> 
> Hi Stephen
> 
> It's not clear that alloc_etherdev_mq() will zero the memory area:
> 
<snip>

Thanks Rickard, given strncpy to strlcpy gets suggested by static code
generators this will probably come up again even if it results in no
real change.  I (covering for Jeff Kirsher) went ahead and added it to
our internal tree.


Reply via email to