diff options
author | 2020-09-20 21:08:54 -0400 | |
---|---|---|
committer | 2020-09-20 19:04:44 -0700 | |
commit | 492adcf481292521ee8df1a482dc12acdb28aa15 (patch) | |
tree | 7b37c5f337e84a71174bb01a4f09800d09c90ef4 /net/switchdev/switchdev.c | |
parent | net: sctp: Fix IPv6 ancestor_size calc in sctp_copy_descendant (diff) | |
download | wireguard-linux-492adcf481292521ee8df1a482dc12acdb28aa15.tar.xz wireguard-linux-492adcf481292521ee8df1a482dc12acdb28aa15.zip |
bnxt_en: Use memcpy to copy VPD field info.
Using strlcpy() to copy from VPD is not correct because VPD strings
are not necessarily NULL terminated. Use memcpy() to copy the VPD
length up to the destination buffer size - 1. The destination is
zeroed memory so it will always be NULL terminated.
Fixes: a0d0fd70fed5 ("bnxt_en: Read partno and serialno of the board from VPD")
Signed-off-by: Vasundhara Volam <vasundhara-v.volam@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions