Re: [PATCH] net: ethernet: intel: ixgbe: ixgbe_main.c: Cleaning up missing null-terminate in conjunction with strncpy

From: Stephen Hemminger
Date: Mon Jul 28 2014 - 22:40:28 EST


On Sat, 26 Jul 2014 16:24:36 +0200
Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx> wrote:

> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
> ---
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/