diff --git a/reprozip/native/syscalls.c b/reprozip/native/syscalls.c
index d2f550f6..62d96eb7 100644
--- a/reprozip/native/syscalls.c
+++ b/reprozip/native/syscalls.c
@@ -861,7 +861,7 @@ static int handle_socket(struct Process *process, const char *msg,
     {
         struct sockaddr_un *address_ = address;
         char buf[109];
-        strncpy(buf, &address_->sun_path, 108);
+        strlcpy(buf, address_->sun_path, 108);
         buf[108] = 0;
         log_info(process->tid, "%s unix:%s", msg, buf);