summaryrefslogtreecommitdiff
path: root/usr.bin/talk
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/talk
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/talk')
-rw-r--r--usr.bin/talk/init_disp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/talk/init_disp.c b/usr.bin/talk/init_disp.c
index 75fe1286b92..3ad5114be47 100644
--- a/usr.bin/talk/init_disp.c
+++ b/usr.bin/talk/init_disp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: init_disp.c,v 1.10 1999/03/23 17:00:38 millert Exp $ */
+/* $OpenBSD: init_disp.c,v 1.11 2000/06/30 16:00:21 millert Exp $ */
/* $NetBSD: init_disp.c,v 1.6 1994/12/09 02:14:17 jtc Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)init_disp.c 8.2 (Berkeley) 2/16/94";
#endif
-static char rcsid[] = "$OpenBSD: init_disp.c,v 1.10 1999/03/23 17:00:38 millert Exp $";
+static char rcsid[] = "$OpenBSD: init_disp.c,v 1.11 2000/06/30 16:00:21 millert Exp $";
#endif /* not lint */
/*
@@ -157,9 +157,9 @@ quit(warning, do_perror)
send_delete();
if (warning) {
if (do_perror)
- warn(warning);
+ warn("%s", warning);
else
- warnx(warning);
+ warnx("%s", warning);
}
exit(0);
}