aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_cmdline/cmdline_parse_portlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_cmdline/cmdline_parse_portlist.c')
-rw-r--r--lib/librte_cmdline/cmdline_parse_portlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/librte_cmdline/cmdline_parse_portlist.c b/lib/librte_cmdline/cmdline_parse_portlist.c
index 5952f343..ad43b522 100644
--- a/lib/librte_cmdline/cmdline_parse_portlist.c
+++ b/lib/librte_cmdline/cmdline_parse_portlist.c
@@ -94,7 +94,7 @@ cmdline_parse_portlist(__attribute__((unused)) cmdline_parse_token_hdr_t *tk,
if (token_len >= PORTLIST_TOKEN_SIZE)
return -1;
- snprintf(portlist_str, token_len+1, "%s", buf);
+ strlcpy(portlist_str, buf, token_len + 1);
if (pl) {
pl->map = 0;