]> asedeno.scripts.mit.edu Git - linux.git/commit
i40e: use correct length for strncpy
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 20 Aug 2018 15:12:30 +0000 (08:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 30 Aug 2018 20:53:04 +0000 (13:53 -0700)
commit7eb74ff891b4e94b8bac48f648a21e4b94ddee64
tree2c2c0c44388d1bbda96af0f196b51fa2aebb0e11
parent3c818910911c93bb5099c6637ec350f90c0e71fc
i40e: use correct length for strncpy

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@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c