summaryrefslogtreecommitdiff
path: root/mux.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2016-08-08 22:40:57 +0000
committerDarren Tucker <dtucker@zip.com.au>2016-08-09 09:33:23 +1000
commit67dca60fbb4923b7a11c1645b90a5ca57c03d8be (patch)
tree8e559bfc30a0336daff74c5a0bca1d995b0b3666 /mux.c
parent4706c1d8c15cd5565b59512853c2da9bd4ca26c9 (diff)
upstream commit
Improve error message for overlong ControlPath. ok markus@ djm@ Upstream-ID: aed374e2e88dd3eb41390003e5303d0089861eb5
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mux.c b/mux.c
index 98e3c0068..a8a753b54 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.60 2016/06/03 03:14:41 dtucker Exp $ */ 1/* $OpenBSD: mux.c,v 1.61 2016/08/08 22:40:57 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -2138,7 +2138,8 @@ muxclient(const char *path)
2138 2138
2139 if (strlcpy(addr.sun_path, path, 2139 if (strlcpy(addr.sun_path, path,
2140 sizeof(addr.sun_path)) >= sizeof(addr.sun_path)) 2140 sizeof(addr.sun_path)) >= sizeof(addr.sun_path))
2141 fatal("ControlPath too long"); 2141 fatal("ControlPath too long ('%s' >= %u bytes)", path,
2142 (unsigned int)sizeof(addr.sun_path));
2142 2143
2143 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) 2144 if ((sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
2144 fatal("%s socket(): %s", __func__, strerror(errno)); 2145 fatal("%s socket(): %s", __func__, strerror(errno));