summaryrefslogtreecommitdiff
path: root/Xtranssock.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xtranssock.c')
-rw-r--r--Xtranssock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Xtranssock.c b/Xtranssock.c
index 1282ed3..07dc297 100644
--- a/Xtranssock.c
+++ b/Xtranssock.c
@@ -1100,7 +1100,8 @@ TRANS(SocketUNIXCreateListener) (XtransConnInfo ciptr, char *port,
return TRANS_CREATE_LISTENER_FAILED;
}
} else {
- sprintf (sockname.sun_path, "%s%ld", UNIX_PATH, (long)getpid());
+ snprintf (sockname.sun_path, sizeof(sockname.sun_path),
+ "%s%ld", UNIX_PATH, (long)getpid());
}
#if (defined(BSD44SOCKETS) || defined(__UNIXWARE__)) && !defined(Lynx)