summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Userland/Tests/Kernel/bind-local-socket-to-symlink.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Tests/Kernel/bind-local-socket-to-symlink.cpp b/Userland/Tests/Kernel/bind-local-socket-to-symlink.cpp
index ce4bfc4a3f..a25c9c8962 100644
--- a/Userland/Tests/Kernel/bind-local-socket-to-symlink.cpp
+++ b/Userland/Tests/Kernel/bind-local-socket-to-symlink.cpp
@@ -47,7 +47,7 @@ int main(int, char**)
struct sockaddr_un addr;
memset(&addr, 0, sizeof(addr));
addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1);
+ strlcpy(addr.sun_path, path, sizeof(addr.sun_path));
rc = bind(fd, (struct sockaddr*)(&addr), sizeof(addr));
if (rc < 0 && errno == EADDRINUSE) {