summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-03-26 01:19:49 +0000
committerderaadt <deraadt@openbsd.org>1997-03-26 01:19:49 +0000
commitd088447b63a8941654a4d9c974e5b5539560368f (patch)
tree613fdbd112e6d3ea02f0be8b7991d50f42c787f6
parentBlocking factor in tar is in 512byte blocks. Makes -b act like (diff)
downloadwireguard-openbsd-d088447b63a8941654a4d9c974e5b5539560368f.tar.xz
wireguard-openbsd-d088447b63a8941654a4d9c974e5b5539560368f.zip
unterminated buffer; charnier@xp11.frmug.org
-rw-r--r--bin/rcp/rcp.c5
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;