fix coverity issues

3388.	[bug]		Fixed several Coverity warnings. [RT #30996]
This commit is contained in:
Evan Hunt
2012-10-02 23:46:15 -07:00
parent a5a7e9785a
commit 8c18302d8b
26 changed files with 119 additions and 86 deletions

View File

@@ -79,7 +79,7 @@ ux_socket_connect(const char *path) {
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, path, sizeof(addr.sun_path));
strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (fd == -1) {