summaryrefslogtreecommitdiff
path: root/Xtranssock.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xtranssock.c')
-rw-r--r--Xtranssock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index 8f64429..9be7f5a 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -1180,7 +1180,7 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
if (abstract) {
sockname.sun_path[0] = '\0';
- namelen = sizeof(sockname);
+ namelen = offsetof(struct sockaddr_un, sun_path) + 1 + strlen(&sockname.sun_path[1]);
}
else
unlink (sockname.sun_path);