summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-06 12:07:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1999-12-06 12:07:22 +0000
commit48cffe96c55ebc8216341935f9ce5b181da10480 (patch)
tree0d1ff1d0f1d553106b82518a56e657b5d9bf6242 /usr.bin/ssh/channels.c
parentab8d4522c1074ac20756f8279980f7e6369755eb (diff)
display great hatred towards strcpy
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 7805eda0d9a..11ebe7d48c9 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -16,7 +16,7 @@
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.31 1999/12/01 13:59:15 markus Exp $");
+RCSID("$Id: channels.c,v 1.32 1999/12/06 12:07:21 deraadt Exp $");
#include "ssh.h"
#include "packet.h"
@@ -921,7 +921,7 @@ channel_request_local_forwarding(u_short port, const char *host,
/* Allocate a channel number for the socket. */
ch = channel_allocate(SSH_CHANNEL_PORT_LISTENER, sock,
xstrdup("port listener"));
- strcpy(channels[ch].path, host);
+ strlcpy(channels[ch].path, host, sizeof(channels[ch].path));
channels[ch].host_port = host_port;
channels[ch].listening_port = port;
}
@@ -1498,7 +1498,8 @@ auth_input_request_forwarding(struct passwd * pw)
/* Allocate a channel for the authentication agent socket. */
newch = channel_allocate(SSH_CHANNEL_AUTH_SOCKET, sock,
xstrdup("auth socket"));
- strcpy(channels[newch].path, channel_forwarded_auth_socket_name);
+ strlcpy(channels[newch].path, channel_forwarded_auth_socket_name,
+ sizeof(channels[newch].path));
}
/* This is called to process an SSH_SMSG_AGENT_OPEN message. */