git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
convert snprintf to strlcpy
[dpdk.git]
/
lib
/
librte_cmdline
/
cmdline_parse_ipaddr.c
diff --git
a/lib/librte_cmdline/cmdline_parse_ipaddr.c
b/lib/librte_cmdline/cmdline_parse_ipaddr.c
index
ae6ea10
..
d34436a
100644
(file)
--- a/
lib/librte_cmdline/cmdline_parse_ipaddr.c
+++ b/
lib/librte_cmdline/cmdline_parse_ipaddr.c
@@
-277,7
+277,7
@@
cmdline_parse_ipaddr(cmdline_parse_token_hdr_t *tk, const char *buf, void *res,
if (token_len >= INET6_ADDRSTRLEN+4)
return -1;
- s
nprintf(ip_str, token_len+1, "%s", buf
);
+ s
trlcpy(ip_str, buf, token_len + 1
);
/* convert the network prefix */
if (tk2->ipaddr_data.flags & CMDLINE_IPADDR_NETWORK) {