mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 21:45:08 -04:00
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>
This commit is contained in:
@@ -64,9 +64,9 @@ static const struct file_operations debugfs_dim_fops = {
|
||||
static void debugfs_dim_ring_init(struct dim *dim, int ring_idx,
|
||||
struct dentry *dd)
|
||||
{
|
||||
static char qname[16];
|
||||
static char qname[12];
|
||||
|
||||
snprintf(qname, 10, "%d", ring_idx);
|
||||
snprintf(qname, sizeof(qname), "%d", ring_idx);
|
||||
debugfs_create_file(qname, 0600, dd, dim, &debugfs_dim_fops);
|
||||
}
|
||||
|
||||
|
||||
@@ -4161,7 +4161,7 @@ static void bnxt_get_pkgver(struct net_device *dev)
|
||||
|
||||
if (!bnxt_get_pkginfo(dev, buf, sizeof(buf))) {
|
||||
len = strlen(bp->fw_ver_str);
|
||||
snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len - 1,
|
||||
snprintf(bp->fw_ver_str + len, FW_VER_STR_LEN - len,
|
||||
"/pkg %s", buf);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user