summaryrefslogtreecommitdiff
path: root/usr.bin/tset/tset.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1999-12-04 22:25:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1999-12-04 22:25:03 +0000
commitceeeb976bc6e78e099688b7c197f920dfde608c2 (patch)
tree8c5df95117edfe6747f0eeec009d38834d060b0e /usr.bin/tset/tset.c
parentfc87c119bf5626ebd4f3b71eac56fc7db8ca426e (diff)
Avoid an oflow in failed(). There's really no need to make a temporary
copy of the string since we are just printing to stderr.
Diffstat (limited to 'usr.bin/tset/tset.c')
-rw-r--r--usr.bin/tset/tset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tset/tset.c b/usr.bin/tset/tset.c
index 622cbc1888e..f4d5dfdbb7b 100644
--- a/usr.bin/tset/tset.c
+++ b/usr.bin/tset/tset.c
@@ -155,8 +155,8 @@ err(const char *fmt, ...)
static void
failed(const char *msg)
{
- char temp[BUFSIZ];
- perror(strcat(strcpy(temp, "tset: "), msg));
+ (void)fputs("tset: ", stderr);
+ perror(msg);
exit(EXIT_FAILURE);
/* NOTREACHED */
}