]> andersk Git - openssh.git/blobdiff - channels.c
- Merged more OpenBSD changes:
[openssh.git] / channels.c
index 8fe9c716c8ecdfe8be795168525b11e926735184..ad79515274b4b5995118a88fba08611f26c9cb98 100644 (file)
@@ -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. */
This page took 0.033417 seconds and 4 git commands to generate.