aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/connection.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
committermarha <marha@users.sourceforge.net>2011-11-25 08:22:48 +0100
commita0b4a1330be6a36ad095222d2ea83927cd33514d (patch)
tree616920ca608751e843c92c9815069f43789e3097 /xorg-server/os/connection.c
parent45710577f374972946a8eb37833a9c94e5a299bf (diff)
downloadvcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.gz
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.tar.bz2
vcxsrv-a0b4a1330be6a36ad095222d2ea83927cd33514d.zip
mesa xserver pixman git update 25 nov 2011
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 b339f4e96..c5fc5a07e 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -386,7 +386,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) &&
@@ -499,7 +499,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
@@ -508,7 +507,7 @@ AuthAudit (ClientPtr client, Bool letin,
#endif
if (!len)
- strcpy(out, "local host");
+ strlcpy(addr, "local host", sizeof(addr));
else
switch (saddr->sa_family)
{
@@ -516,11 +515,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)
@@ -528,13 +527,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) {
@@ -1267,7 +1266,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