[Intel-wired-lan] [next PATCH S95 09/12] i40e: use correct length for strncpy

Bowers, AndrewX andrewx.bowers at intel.com
Thu Aug 23 16:11:22 UTC 2018


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Monday, August 20, 2018 8:13 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S95 09/12] i40e: use correct length for
> strncpy
> 
> From: Mitch Williams <mitch.a.williams at intel.com>
> 
> Caught by gcc 8. When we provide a length for strncpy, we should not
> include the terminating null. So we must tell it one less than the size of the
> destination buffer.
> 
> Signed-off-by: Mitch Williams <mitch.a.williams at intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e_ptp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list