summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--channels.c8
-rw-r--r--session.c5
3 files changed, 9 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index f589a537f..d79457079 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
5 - stevesk@cvs.openbsd.org 2001/12/06 18:02:32 5 - stevesk@cvs.openbsd.org 2001/12/06 18:02:32
6 [channels.c sshconnect.c] 6 [channels.c sshconnect.c]
7 shutdown(sock, SHUT_RDWR) not needed here; ok markus@ 7 shutdown(sock, SHUT_RDWR) not needed here; ok markus@
8 - stevesk@cvs.openbsd.org 2001/12/06 18:09:23
9 [channels.c session.c]
10 strncpy->strlcpy. remaining strncpy's are necessary. ok markus@
8 11
920011206 1220011206
10 - (bal) OpenBSD CVS Sync 13 - (bal) OpenBSD CVS Sync
@@ -7002,4 +7005,4 @@
7002 - Wrote replacements for strlcpy and mkdtemp 7005 - Wrote replacements for strlcpy and mkdtemp
7003 - Released 1.0pre1 7006 - Released 1.0pre1
7004 7007
7005$Id: ChangeLog,v 1.1689 2001/12/07 17:24:49 mouring Exp $ 7008$Id: ChangeLog,v 1.1690 2001/12/07 17:26:48 mouring Exp $
diff --git a/channels.c b/channels.c
index 7cc0d281e..3fe619f48 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.144 2001/12/06 18:02:32 stevesk Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.145 2001/12/06 18:09:23 stevesk Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -2609,8 +2609,7 @@ x11_connect_display(void)
2609 * Connect to an inet socket. The DISPLAY value is supposedly 2609 * Connect to an inet socket. The DISPLAY value is supposedly
2610 * hostname:d[.s], where hostname may also be numeric IP address. 2610 * hostname:d[.s], where hostname may also be numeric IP address.
2611 */ 2611 */
2612 strncpy(buf, display, sizeof(buf)); 2612 strlcpy(buf, display, sizeof(buf));
2613 buf[sizeof(buf) - 1] = 0;
2614 cp = strchr(buf, ':'); 2613 cp = strchr(buf, ':');
2615 if (!cp) { 2614 if (!cp) {
2616 error("Could not find ':' in DISPLAY: %.100s", display); 2615 error("Could not find ':' in DISPLAY: %.100s", display);
@@ -2893,8 +2892,7 @@ auth_input_request_forwarding(struct passwd * pw)
2893 /* Bind it to the name. */ 2892 /* Bind it to the name. */
2894 memset(&sunaddr, 0, sizeof(sunaddr)); 2893 memset(&sunaddr, 0, sizeof(sunaddr));
2895 sunaddr.sun_family = AF_UNIX; 2894 sunaddr.sun_family = AF_UNIX;
2896 strncpy(sunaddr.sun_path, auth_sock_name, 2895 strlcpy(sunaddr.sun_path, auth_sock_name, sizeof(sunaddr.sun_path));
2897 sizeof(sunaddr.sun_path));
2898 2896
2899 if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0) 2897 if (bind(sock, (struct sockaddr *) & sunaddr, sizeof(sunaddr)) < 0)
2900 packet_disconnect("bind: %.100s", strerror(errno)); 2898 packet_disconnect("bind: %.100s", strerror(errno));
diff --git a/session.c b/session.c
index 551eb37e6..1d7291e6f 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.110 2001/12/01 21:41:48 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.111 2001/12/06 18:09:23 stevesk Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1473,8 +1473,7 @@ do_child(Session *s, const char *command)
1473 1473
1474 /* Start the shell. Set initial character to '-'. */ 1474 /* Start the shell. Set initial character to '-'. */
1475 buf[0] = '-'; 1475 buf[0] = '-';
1476 strncpy(buf + 1, cp, sizeof(buf) - 1); 1476 strlcpy(buf + 1, cp, sizeof(buf) - 1);
1477 buf[sizeof(buf) - 1] = 0;
1478 1477
1479 /* Execute the shell. */ 1478 /* Execute the shell. */
1480 argv[0] = buf; 1479 argv[0] = buf;