bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Fri, 10 Aug 2018 22:24:43 +0000 (18:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Aug 2018 02:12:18 +0000 (19:12 -0700)
commit8605212a7c37b5d786544263bae5e697c1aaaa16
tree718e1ee7117c29d99d341185000a54581c158912
parent0520344cdb1efa7c6404168b66f8dd0b1fe5face
bnxt_en: Fix strcpy() warnings in bnxt_ethtool.c

This patch fixes following smatch warnings:

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2826 bnxt_fill_coredump_seg_hdr() error: strcpy() '"sEgM"' too large for 'seg_hdr->signature' (5 vs 4)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2858 bnxt_fill_coredump_record() error: strcpy() '"cOrE"' too large for 'record->signature' (5 vs 4)
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:2879 bnxt_fill_coredump_record() error: strcpy() 'utsname()->sysname' too large for 'record->os_name' (65 vs 32)

Fixes: 6c5657d085ae ("bnxt_en: Add support for ethtool get dump.")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
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>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c