aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/connection.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:32:21 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:32:21 +0100
commit849d328b25c2f3c87d539e1fe7af38e7580a0409 (patch)
tree349c425a87ddb3aaa1d7832d5a8e68252fc73ddb /xorg-server/os/connection.c
parenta8a12d4c8be177f63cae7dc96c2b52f09e228a76 (diff)
parenta0b4a1330be6a36ad095222d2ea83927cd33514d (diff)
downloadvcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.gz
vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.tar.bz2
vcxsrv-849d328b25c2f3c87d539e1fe7af38e7580a0409.zip
Merge remote-tracking branch 'origin/released'
Conflicts: xorg-server/glx/glxdriswrast.c xorg-server/glx/single2.c xorg-server/hw/xwin/winconfig.c xorg-server/os/osinit.c xorg-server/os/xdmcp.c xorg-server/xkb/xkbInit.c
Diffstat (limited to 'xorg-server/os/connection.c')
-rw-r--r--xorg-server/os/connection.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index cc5a4d3f5..bff81051e 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -412,7 +412,7 @@ CreateWellKnownSockets(void)
FD_ZERO (&WellKnownConnections);
- sprintf (port, "%d", atoi (display));
+ snprintf (port, sizeof(port), "%d", atoi (display));
if ((_XSERVTransMakeAllCOTSServerListeners (port, &partial,
&ListenTransCount, &ListenTransConns) >= 0) &&
@@ -528,7 +528,6 @@ AuthAudit (ClientPtr client, Bool letin,
unsigned int proto_n, char *auth_proto, int auth_id)
{
char addr[128];
- char *out = addr;
char client_uid_string[64];
LocalClientCredRec *lcc;
#ifdef XSERVER_DTRACE
@@ -537,7 +536,7 @@ AuthAudit (ClientPtr client, Bool letin,
#endif
if (!len)
- strcpy(out, "local host");
+ strlcpy(addr, "local host", sizeof(addr));
else
switch (saddr->sa_family)
{
@@ -545,11 +544,11 @@ AuthAudit (ClientPtr client, Bool letin,
#if defined(UNIXCONN) || defined(LOCALCONN)
case AF_UNIX:
#endif
- strcpy(out, "local host");
+ strlcpy(addr, "local host", sizeof(addr));
break;
#if defined(TCPCONN) || defined(STREAMSCONN)
case AF_INET:
- sprintf(out, "IP %s",
+ snprintf(addr, sizeof(addr), "IP %s",
inet_ntoa(((struct sockaddr_in *) saddr)->sin_addr));
break;
#if defined(IPv6) && defined(AF_INET6)
@@ -557,13 +556,13 @@ AuthAudit (ClientPtr client, Bool letin,
char ipaddr[INET6_ADDRSTRLEN];
inet_ntop(AF_INET6, &((struct sockaddr_in6 *) saddr)->sin6_addr,
ipaddr, sizeof(ipaddr));
- sprintf(out, "IP %s", ipaddr);
+ snprintf(addr, sizeof(addr), "IP %s", ipaddr);
}
break;
#endif
#endif
default:
- strcpy(out, "unknown address");
+ strlcpy(addr, "unknown address", sizeof(addr));
}
if (GetLocalClientCreds(client, &lcc) != -1) {
@@ -1307,7 +1306,7 @@ void ListenOnOpenFD(int fd, int noxauth) {
strcpy(port, display_env);
} else {
/* Just some default so things don't break and die. */
- sprintf(port, ":%d", atoi(display));
+ snprintf(port, sizeof(port), ":%d", atoi(display));
}
/* Make our XtransConnInfo