diff options
author | 2003-04-26 02:57:35 +0000 | |
---|---|---|
committer | 2003-04-26 02:57:35 +0000 | |
commit | 952cad2dda3cee4556f4300280db361f86393e17 (patch) | |
tree | 50189a34b7be75b7a25704e6a1f7886cf9fe072a | |
parent | remove a bit more junk (diff) | |
download | wireguard-openbsd-952cad2dda3cee4556f4300280db361f86393e17.tar.xz wireguard-openbsd-952cad2dda3cee4556f4300280db361f86393e17.zip |
string cleanup; ok tedu
-rw-r--r-- | sbin/restore/interactive.c | 8 | ||||
-rw-r--r-- | sbin/restore/symtab.c | 6 |
2 files changed, 7 insertions, 7 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; } } diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c index 77282b072f5..76d1f929d9f 100644 --- a/sbin/restore/symtab.c +++ b/sbin/restore/symtab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: symtab.c,v 1.8 2002/08/12 00:42:56 aaron Exp $ */ +/* $OpenBSD: symtab.c,v 1.9 2003/04/26 02:57:35 deraadt Exp $ */ /* $NetBSD: symtab.c,v 1.10 1997/03/19 08:42:54 lukem Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)symtab.c 8.2 (Berkeley) 9/13/94"; #else -static char rcsid[] = "$OpenBSD: symtab.c,v 1.8 2002/08/12 00:42:56 aaron Exp $"; +static char rcsid[] = "$OpenBSD: symtab.c,v 1.9 2003/04/26 02:57:35 deraadt Exp $"; #endif #endif /* not lint */ @@ -419,7 +419,7 @@ savename(name) if (cp == NULL) panic("no space for string table\n"); } - (void)strcpy(cp, name); + (void)strlcpy(cp, name, len + 1); return (cp); } |