On Tue, 2014-07-29 at 14:15 +0200, Rickard Strandqvist wrote: > Den 29 jul 2014 04:40 skrev "Stephen Hemminger" <[email protected] > >: > > > > On Sat, 26 Jul 2014 16:24:36 +0200 > > Rickard Strandqvist <[email protected]> wrote: > > > > > Replacing strncpy with strlcpy to avoid strings that lacks null > terminate. > > > > > > Signed-off-by: Rickard Strandqvist < > [email protected]> > > > --- > > 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. ------------------------------------------------------------------------------ Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk _______________________________________________ E1000-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
