summaryrefslogtreecommitdiff
path: root/sbin/restore/interactive.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-26 02:57:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-26 02:57:36 +0000
commit7ac9cc7d9ca274dd09073d96c04baa1f33c83019 (patch)
treef6f394b7abc3c03cbaac2b1beaf7c51dc264fb4c /sbin/restore/interactive.c
parent13579244c1144de3b34dc9f6d6f13ef4c574b718 (diff)
string cleanup; ok tedu
Diffstat (limited to 'sbin/restore/interactive.c')
-rw-r--r--sbin/restore/interactive.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c
index 7bc82c25654..eec98a99304 100644
--- a/sbin/restore/interactive.c
+++ b/sbin/restore/interactive.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interactive.c,v 1.15 2003/04/04 22:12:35 deraadt Exp $ */
+/* $OpenBSD: interactive.c,v 1.16 2003/04/26 02:57:35 deraadt Exp $ */
/* $NetBSD: interactive.c,v 1.10 1997/03/19 08:42:52 lukem Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)interactive.c 8.3 (Berkeley) 9/13/94";
#else
-static char rcsid[] = "$OpenBSD: interactive.c,v 1.15 2003/04/04 22:12:35 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: interactive.c,v 1.16 2003/04/26 02:57:35 deraadt Exp $";
#endif
#endif /* not lint */
@@ -500,14 +500,14 @@ canon(rawname, canonname, canonnamelen)
np++;
if (np - cp == 1 && *cp == '.') {
cp--;
- (void)strcpy(cp, np);
+ (void)strlcpy(cp, np, canonname + canonnamelen - cp);
np = cp;
}
if (np - cp == 2 && strncmp(cp, "..", 2) == 0) {
cp--;
while (cp > &canonname[1] && *--cp != '/')
/* find beginning of name */;
- (void)strcpy(cp, np);
+ (void)strlcpy(cp, np, canonname + canonnamelen - cp);
np = cp;
}
}