diff options
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; |