From fdabbf8ed7cd3f5937141b80b448eabe9c459ea5 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Thu, 27 Dec 2012 23:53:58 +0100 Subject: [PATCH] ctl: fix previous partial commit about unix path max length Never commit without compiling. Thanks Travis-CI for spotting this. --- src/ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ctl.c b/src/ctl.c index b730c8cf..eba8396d 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -80,7 +80,7 @@ ctl_connect(char *name) if ((s = socket(PF_UNIX, SOCK_STREAM, 0)) == -1) return -1; su.sun_family = AF_UNIX; - strlcpy(su.sun_path, name, UNIX_PATH_MAX); + strlcpy(su.sun_path, name, sizeof(su.sun_path)); if (connect(s, (struct sockaddr *)&su, sizeof(struct sockaddr_un)) == -1) { rc = errno; log_warn("control", "unable to connect to socket %s", name); -- 2.39.5