From: 沈子俊 shenzijun@kylinos.cn
kylin inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I4AG3E?from=project-issue CVE: NA
---------------------------------------------------
change copy size in the function strncpy().
Signed-off-by: 沈子俊 shenzijun@kylinos.cn --- drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c b/drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c index 5cb8ef61e04b..9af9f19fb491 100644 --- a/drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c +++ b/drivers/net/ethernet/netswift/txgbe/txgbe_ethtool.c @@ -1040,7 +1040,7 @@ static void txgbe_get_drvinfo(struct net_device *netdev, strncpy(drvinfo->version, txgbe_driver_version, sizeof(drvinfo->version) - 1); strncpy(drvinfo->fw_version, adapter->eeprom_id, - sizeof(drvinfo->fw_version)); + sizeof(drvinfo->fw_version) - 1); strncpy(drvinfo->bus_info, pci_name(adapter->pdev), sizeof(drvinfo->bus_info) - 1); if (adapter->num_tx_queues <= TXGBE_NUM_RX_QUEUES) {