diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-02-04 17:59:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1999-02-04 17:59:39 +0000 |
commit | 3a068180450c974981da137e692c482ec0dabd5f (patch) | |
tree | 41761f76c42df0fa90d2476dc8716f2b382a22e8 | |
parent | 5e92591e3563e70186e25094e67176b9fe996aa3 (diff) |
remove strcpy, even if safe
-rw-r--r-- | usr.bin/tip/value.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.bin/tip/value.c b/usr.bin/tip/value.c index b36b8decab4..82f152aa700 100644 --- a/usr.bin/tip/value.c +++ b/usr.bin/tip/value.c @@ -1,4 +1,4 @@ -/* $OpenBSD: value.c,v 1.5 1997/09/01 23:24:28 deraadt Exp $ */ +/* $OpenBSD: value.c,v 1.6 1999/02/04 17:59:38 deraadt Exp $ */ /* $NetBSD: value.c,v 1.6 1997/02/11 09:24:09 mrg Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)value.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: value.c,v 1.5 1997/09/01 23:24:28 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: value.c,v 1.6 1999/02/04 17:59:38 deraadt Exp $"; #endif /* not lint */ #include "tip.h" @@ -74,8 +74,7 @@ vinit() (void)fprintf(stderr, "Home directory path too long: %s\n", value(HOME)); } else { - strcpy(file, value(HOME)); - strcat(file, "/.tiprc"); + snprintf(file, sizeof file, "%s/.tiprc", value(HOME)); if ((f = fopen(file, "r")) != NULL) { register char *tp; |