summary refs log tree commit diff
path: root/dispatch.c
diff options
context:
space:
mode:
Diffstat (limited to 'dispatch.c')
-rw-r--r--dispatch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dispatch.c b/dispatch.c
index e80f297..d762105 100644
--- a/dispatch.c
+++ b/dispatch.c
@@ -288,7 +288,7 @@ int main(int argc, char *argv[]) {
 			}
 
 			struct sockaddr_un addr = { .sun_family = AF_UNIX };
-			strncpy(addr.sun_path, name, sizeof(addr.sun_path));
+			strlcpy(addr.sun_path, name, sizeof(addr.sun_path));
 
 			int sock = socket(PF_UNIX, SOCK_STREAM, 0);
 			if (sock < 0) err(EX_OSERR, "socket");