diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-07 17:26:48 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-12-07 17:26:48 +0000 |
commit | ccd8d07b3cf35190b5fdbd8597e908c05e3e15b7 (patch) | |
tree | 50ab332b6ffd3a38a2a01100b31f3ad899740fb4 /session.c | |
parent | e181a4d2949d063a9417cf2691cb0ec2d3568e53 (diff) |
- stevesk@cvs.openbsd.org 2001/12/06 18:09:23
[channels.c session.c]
strncpy->strlcpy. remaining strncpy's are necessary. ok markus@
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.110 2001/12/01 21:41:48 markus Exp $"); | 36 | RCSID("$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; |