]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Replace strncpy with strlcpy to ensure null termination
authorPatryk Małek <patryk.malek@intel.com>
Tue, 30 Oct 2018 17:50:44 +0000 (10:50 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 14 Nov 2018 18:56:33 +0000 (10:56 -0800)
commit7d3486f88be6c481092d3e8491b8e1ce75a50e5c
tree25110bedbdfda860f90169367d42080e104aa5ad
parent6276cc2ef04cfd6b77810b086ca5aff613be6542
i40e: Replace strncpy with strlcpy to ensure null termination

Using strncpy allows destination buffer to be not null terminated
after the copying takes place. strlcpy ensures that's not the
case by explicitly setting last element in the buffer as '\0'.

Signed-off-by: Patryk Małek <patryk.malek@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_main.c
drivers/net/ethernet/intel/i40e/i40e_ptp.c