commit | 5147be02262dbd18cb7283ff660a8169eaa88b8a | [log] [tgz] |
---|---|---|
author | Jiri Pirko <jiri@nvidia.com> | Thu Nov 24 15:49:19 2022 +0100 |
committer | Jiri Pirko <jiri@nvidia.com> | Thu Nov 24 15:50:27 2022 +0100 |
tree | 6fe24db7c93d64c5a8d6fe5533dcef0835e51fa0 | |
parent | ffc6a52bd285a476b547312012078af69220574b [diff] |
misc: fix possible strncpy truncation bug Spotted by compiler warning: ../include/private/misc.h:93:9: warning: ‘strncpy’ output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation] 93 | strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Use IFNAMSIZ size to fix this. Signed-off-by: Jiri Pirko <jiri@nvidia.com>