diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ar/misc.c | 9 | ||||
-rw-r--r-- | usr.bin/ar/pathnames.h | 6 |
2 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/ar/misc.c b/usr.bin/ar/misc.c index 65e71d46bdd..215f944a207 100644 --- a/usr.bin/ar/misc.c +++ b/usr.bin/ar/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.3 1997/09/11 11:24:54 deraadt Exp $ */ +/* $OpenBSD: misc.c,v 1.4 1999/08/26 09:04:00 fgsch Exp $ */ /* $NetBSD: misc.c,v 1.6 1995/03/26 03:27:55 glass Exp $ */ /*- @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.3 (Berkeley) 4/2/94"; #else -static char rcsid[] = "$OpenBSD: misc.c,v 1.3 1997/09/11 11:24:54 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: misc.c,v 1.4 1999/08/26 09:04:00 fgsch Exp $"; #endif #endif /* not lint */ @@ -77,9 +77,10 @@ tmp() } if (envtmp) - (void)sprintf(path, "%s/%s", envtmp, _NAME_ARTMP); + (void)snprintf(path, sizeof(path), "%s/%s", envtmp, + _NAME_ARTMP); else - strcpy(path, _PATH_ARTMP); + strlcpy(path, _PATH_ARTMP, sizeof(path)); sigfillset(&set); (void)sigprocmask(SIG_BLOCK, &set, &oset); diff --git a/usr.bin/ar/pathnames.h b/usr.bin/ar/pathnames.h index 2d628260a3f..1dc46689c1f 100644 --- a/usr.bin/ar/pathnames.h +++ b/usr.bin/ar/pathnames.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pathnames.h,v 1.2 1996/06/26 05:31:22 deraadt Exp $ */ +/* $OpenBSD: pathnames.h,v 1.3 1999/08/26 09:04:00 fgsch Exp $ */ /* $NetBSD: pathnames.h,v 1.4 1995/03/25 06:39:50 glass Exp $ */ /*- @@ -39,5 +39,5 @@ * @(#)pathnames.h 8.1 (Berkeley) 6/6/93 */ -#define _NAME_ARTMP "ar.XXXXXX" -#define _PATH_ARTMP "/tmp/ar.XXXXXX" +#define _NAME_ARTMP "ar.XXXXXXXXXX" +#define _PATH_ARTMP "/tmp/ar.XXXXXXXXXX" |