Commit 35c9ffba authored by Jakub Kicinski's avatar Jakub Kicinski

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.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 2984e69a 1418e9ab
......@@ -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);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment