diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-28 00:54:11 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-10-28 00:54:11 +0000 |
commit | bef4d5ffdda4f2cfc7fb3cbcff6b969c02ec7e26 (patch) | |
tree | de130879606400f13ac5f1724e9ded13a3516b6b /usr.bin/telnet/commands.c | |
parent | 7045d1de0f5ad76806333a19de48f00256ebd939 (diff) |
Safe $HOME handling.
Diffstat (limited to 'usr.bin/telnet/commands.c')
-rw-r--r-- | usr.bin/telnet/commands.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/telnet/commands.c b/usr.bin/telnet/commands.c index c04b2f82b29..eed1a0ce835 100644 --- a/usr.bin/telnet/commands.c +++ b/usr.bin/telnet/commands.c @@ -1,4 +1,4 @@ -/* $OpenBSD: commands.c,v 1.6 1996/09/05 09:10:02 deraadt Exp $ */ +/* $OpenBSD: commands.c,v 1.7 1996/10/28 00:54:10 millert Exp $ */ /* $NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $ */ /* @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)commands.c 8.4 (Berkeley) 5/30/95"; static char rcsid[] = "$NetBSD: commands.c,v 1.14 1996/03/24 22:03:48 jtk Exp $"; #else -static char rcsid[] = "$OpenBSD: commands.c,v 1.6 1996/09/05 09:10:02 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: commands.c,v 1.7 1996/10/28 00:54:10 millert Exp $"; #endif #endif /* not lint */ @@ -2636,7 +2636,7 @@ cmdrc(m1, m2) if (rcname == 0) { rcname = getenv("HOME"); - if (rcname) + if (rcname && (strlen(rcname) + 10) < sizeof(rcbuf)) strcpy(rcbuf, rcname); else rcbuf[0] = '\0'; |