aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index 7550519b..399ba189 100644
--- a/socket.c
+++ b/socket.c
@@ -217,7 +217,7 @@ int UnixOpen(const char *path)
struct sockaddr_un ad;
memset(&ad, 0, sizeof(ad));
ad.sun_family = AF_UNIX;
- strncpy(ad.sun_path, path, sizeof(ad.sun_path)-1);
+ strlcpy(ad.sun_path, path, sizeof(ad.sun_path));
sock = socket( AF_UNIX, SOCK_STREAM, 0 );
if (sock < 0)