projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bridge: Drop obsolete comment.
[openvswitch]
/
lib
/
socket-util.c
diff --git
a/lib/socket-util.c
b/lib/socket-util.c
index 275bf309a3564826cdf1834c5ff6e426325fb761..e0f34e71409dec627e16f9938b5512f20534e662 100644
(file)
--- a/
lib/socket-util.c
+++ b/
lib/socket-util.c
@@
-233,8
+233,7
@@
static void
make_sockaddr_un__(const char *name, struct sockaddr_un *un, socklen_t *un_len)
{
un->sun_family = AF_UNIX;
make_sockaddr_un__(const char *name, struct sockaddr_un *un, socklen_t *un_len)
{
un->sun_family = AF_UNIX;
- strncpy(un->sun_path, name, sizeof un->sun_path);
- un->sun_path[sizeof un->sun_path - 1] = '\0';
+ ovs_strzcpy(un->sun_path, name, sizeof un->sun_path);
*un_len = (offsetof(struct sockaddr_un, sun_path)
+ strlen (un->sun_path) + 1);
}
*un_len = (offsetof(struct sockaddr_un, sun_path)
+ strlen (un->sun_path) + 1);
}