From: Vincent Bernat Date: Thu, 27 Dec 2012 22:53:58 +0000 (+0100) Subject: ctl: fix previous partial commit about unix path max length X-Git-Tag: 0.7.0~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fdabbf8ed7cd3f5937141b80b448eabe9c459ea5;p=thirdparty%2Flldpd.git ctl: fix previous partial commit about unix path max length Never commit without compiling. Thanks Travis-CI for spotting this. --- 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);