diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-10-29 11:08:17 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2011-11-23 12:15:06 -0800 |
commit | 05d8a7f7a785eff3292f0f0537bb3902930f1b5c (patch) | |
tree | 43dc322a988c1fab65622c2aea31c2b818ce20c8 /os/connection.c | |
parent | b967bf2af264726042e2f6ffb9ca7d234f34b56b (diff) |
Convert a bunch of sprintf to snprintf calls
This batch is the straightforward set - others are more complex and
need more analysis to determine right size to pass.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'os/connection.c')
-rw-r--r-- | os/connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/os/connection.c b/os/connection.c index 957b928dd..c5fc5a07e 100644 --- a/os/connection.c +++ b/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) && @@ -1266,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 |