From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
stable@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v3 1/2] eal: fix off by one in in tailq name init
Date: Tue, 9 Jun 2026 08:53:30 -0700 [thread overview]
Message-ID: <20260609155419.263787-2-stephen@networkplumber.org> (raw)
In-Reply-To: <20260609155419.263787-1-stephen@networkplumber.org>
The tailq name is defined as 32 bytes, but name would be
silently truncated at 31 bytes. The function strlcpy() size
already accounts for the nul character at the end.
Fixes: f9acaf84e923 ("replace snprintf with strlcpy without adding extra include")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
Exposed by automated review of next patch.
lib/eal/common/eal_common_tailqs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/eal/common/eal_common_tailqs.c b/lib/eal/common/eal_common_tailqs.c
index c581f43b6f..fe3ced21c7 100644
--- a/lib/eal/common/eal_common_tailqs.c
+++ b/lib/eal/common/eal_common_tailqs.c
@@ -83,7 +83,7 @@ rte_eal_tailq_create(const char *name)
mcfg = rte_eal_get_configuration()->mem_config;
head = &mcfg->tailq_head[rte_tailqs_count];
- strlcpy(head->name, name, sizeof(head->name) - 1);
+ strlcpy(head->name, name, sizeof(head->name));
TAILQ_INIT(&head->tailq_head);
rte_tailqs_count++;
}
--
2.53.0
next prev parent reply other threads:[~2026-06-09 15:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-07 15:04 [PATCH] eal: add destructor to unregister tailq on unload Stephen Hemminger
2026-06-08 7:57 ` Bruce Richardson
2026-06-09 9:18 ` David Marchand
2026-06-09 14:26 ` [PATCH v2] " Stephen Hemminger
2026-06-10 1:19 ` fengchengwen
2026-06-10 15:57 ` Stephen Hemminger
2026-06-09 15:53 ` [PATCH v3 0/2] eal: tailq fixes Stephen Hemminger
2026-06-09 15:53 ` Stephen Hemminger [this message]
2026-06-10 1:35 ` [PATCH v3 1/2] eal: fix off by one in in tailq name init fengchengwen
2026-06-09 15:53 ` [PATCH v3 2/2] eal: add destructor to unregister tailq on unload Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609155419.263787-2-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox