Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'bnxt_en-address-string-truncation'

Simon Horman says:

====================
bnxt_en: address string truncation

This series addresses several string truncation issues that are flagged
by gcc-14. I do not have any reason to believe these are bugs, so I am
targeting this at net-next and have not provided Fixes tags.

v1: https://lore.kernel.org/r/20240705-bnxt-str-v1-0-bafc769ed89e@kernel.org
====================

Link: https://patch.msgid.link/20240813-bnxt-str-v2-0-872050a157e7@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+3 -3
+2 -2
drivers/net/ethernet/broadcom/bnxt/bnxt_debugfs.c
··· 64 64 static void debugfs_dim_ring_init(struct dim *dim, int ring_idx, 65 65 struct dentry *dd) 66 66 { 67 - static char qname[16]; 67 + static char qname[12]; 68 68 69 - snprintf(qname, 10, "%d", ring_idx); 69 + snprintf(qname, sizeof(qname), "%d", ring_idx); 70 70 debugfs_create_file(qname, 0600, dd, dim, &debugfs_dim_fops); 71 71 } 72 72
+1 -1
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
··· 4161 4161 4162 4162 if (!bnxt_get_pkginfo(dev, buf, sizeof(buf))) { 4163 4163 len = strlen(bp->fw_ver_str); 4164 - snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1, 4164 + snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len, 4165 4165 "/pkg %s", buf); 4166 4166 } 4167 4167 }