summaryrefslogtreecommitdiff
path: root/client/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'client/client.c')
-rw-r--r--client/client.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/client/client.c b/client/client.c
index d65ea066..e3f539e1 100644
--- a/client/client.c
+++ b/client/client.c
@@ -252,6 +252,10 @@ server_connect(void)
server_fd = socket(AF_UNIX, SOCK_STREAM, 0);
if (server_fd < 0)
die("Cannot create socket: %m");
+
+ if (strlen(server_path) >= sizeof(sa.sun_path))
+ die("server_connect: path too long");
+
bzero(&sa, sizeof(sa));
sa.sun_family = AF_UNIX;
strcpy(sa.sun_path, server_path);