diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-26 02:57:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-04-26 02:57:36 +0000 |
commit | 7ac9cc7d9ca274dd09073d96c04baa1f33c83019 (patch) | |
tree | f6f394b7abc3c03cbaac2b1beaf7c51dc264fb4c | |
parent | 13579244c1144de3b34dc9f6d6f13ef4c574b718 (diff) |
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); } |