summaryrefslogtreecommitdiff
path: root/usr.bin/calendar
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-06-30 16:00:30 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-06-30 16:00:30 +0000
commitb643bb9badf4a995d989b8daf3e33ba8ee6ffda2 (patch)
tree87720e8aa60a5b4230d0072dfd2b3d422d7dd1cd /usr.bin/calendar
parent46239127052c30fac93140fbe021cdd151fdac8a (diff)
warnx?/errx? paranoia (use "%s" not a bare string unless it is a
constant). These are not security holes but it is worth fixing them anyway both for robustness and so folks looking for examples in the tree are not misled into doing something potentially dangerous. Furthermore, it is a bad idea to assume that pathnames will not include '%' in them and that error routines don't return strings with '%' in them (especially in light of the possibility of locales).
Diffstat (limited to 'usr.bin/calendar')
-rw-r--r--usr.bin/calendar/calendar.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/calendar/calendar.c b/usr.bin/calendar/calendar.c
index cef979181ef..93405efdbd4 100644
--- a/usr.bin/calendar/calendar.c
+++ b/usr.bin/calendar/calendar.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: calendar.c,v 1.12 1998/12/13 07:31:07 pjanzen Exp $ */
+/* $OpenBSD: calendar.c,v 1.13 2000/06/30 16:00:11 millert Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -43,7 +43,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
#else
-static char rcsid[] = "$OpenBSD: calendar.c,v 1.12 1998/12/13 07:31:07 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: calendar.c,v 1.13 2000/06/30 16:00:11 millert Exp $";
#endif
#endif /* not lint */
@@ -85,7 +85,7 @@ main(argc, argv)
case '-': /* backward contemptible */
case 'a':
if (getuid())
- errx(1, strerror(EPERM));
+ errx(1, "%s", strerror(EPERM));
doall = 1;
break;