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
ethdev: replace snprintf with strlcpy on init
[dpdk.git]
/
lib
/
librte_ethdev
/
rte_ethdev.c
diff --git
a/lib/librte_ethdev/rte_ethdev.c
b/lib/librte_ethdev/rte_ethdev.c
index
95889ed
..
3f22536
100644
(file)
--- a/
lib/librte_ethdev/rte_ethdev.c
+++ b/
lib/librte_ethdev/rte_ethdev.c
@@
-459,7
+459,7
@@
rte_eth_dev_allocate(const char *name)
}
eth_dev = eth_dev_get(port_id);
- s
nprintf(eth_dev->data->name, sizeof(eth_dev->data->name), "%s", name
);
+ s
trlcpy(eth_dev->data->name, name, sizeof(eth_dev->data->name)
);
eth_dev->data->port_id = port_id;
eth_dev->data->mtu = ETHER_MTU;