diff options
author | Ben Pfaff <blp@nicira.com> | 2015-02-20 12:32:08 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2015-02-20 12:32:17 -0800 |
commit | 8742957c2b5f65af4507c4345f7ccf177ae1361b (patch) | |
tree | 156ec8760aef59bff36438b572d5e7223ca6cdbb /lib/tnl-ports.c | |
parent | afc1d536743e2d869fe90712b51a57334b57e3cc (diff) | |
download | openvswitch-8742957c2b5f65af4507c4345f7ccf177ae1361b.tar.gz |
userspace: Replace all uses of strncpy() by ovs_strlcpy().
strncpy() has a lot of pitfalls. A while back we replaced all its uses by
calls to ovs_strlcpy() or ovs_strzcpy(), but some more have crept in. This
commit fixes them.
Reported-by: Russell Bryant <rbryant@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@noironetworks.com>
Diffstat (limited to 'lib/tnl-ports.c')
-rw-r--r-- | lib/tnl-ports.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tnl-ports.c b/lib/tnl-ports.c index e6739b9f0..478945d0d 100644 --- a/lib/tnl-ports.c +++ b/lib/tnl-ports.c @@ -101,7 +101,7 @@ tnl_port_map_insert(odp_port_t port, ovs_be32 ip_dst, ovs_be16 udp_port, cls_rule_init(&p->cr, &match, 0); /* Priority == 0. */ ovs_refcount_init(&p->ref_cnt); - strncpy(p->dev_name, dev_name, IFNAMSIZ); + ovs_strlcpy(p->dev_name, dev_name, sizeof p->dev_name); classifier_insert(&cls, &p->cr, NULL, 0); } |