diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-03-26 01:19:50 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-03-26 01:19:50 +0000 |
commit | 3ee13251e16e6734ae58cda526729e6008576994 (patch) | |
tree | e1c0eec598f99633f23fc6fb55ac4d4737283bf6 | |
parent | 194f29ba187fa41fb31ce0718a7a0431fa0af83f (diff) |
unterminated buffer; charnier@xp11.frmug.org
-rw-r--r-- | bin/rcp/rcp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c index 2052c22c0a9..0916690386c 100644 --- a/bin/rcp/rcp.c +++ b/bin/rcp/rcp.c @@ -1,5 +1,5 @@ /* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */ -/* $OpenBSD: rcp.c,v 1.9 1997/01/15 23:40:25 millert Exp $ */ +/* $OpenBSD: rcp.c,v 1.10 1997/03/26 01:19:49 deraadt Exp $ */ /* * Copyright (c) 1983, 1990, 1992, 1993 @@ -134,7 +134,8 @@ main(argc, argv) #ifdef KERBEROS case 'k': dest_realm = dst_realm_buf; - (void)strncpy(dst_realm_buf, optarg, REALM_SZ); + (void)strncpy(dst_realm_buf, optarg, REALM_SZ-1); + dst_realm_buf[REALM_SZ-1] = '\0'; break; case 'x': doencrypt = 1; |