summaryrefslogtreecommitdiffstats
path: root/usr.bin/script/script.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2000-06-30 16:00:03 +0000
committermillert <millert@openbsd.org>2000-06-30 16:00:03 +0000
commitb638aa94715d7c4b461552b23f350ea53e1afd5a (patch)
treeaa7fbc4972a0b2e67a2a10a222aefffd0c85c9a5 /usr.bin/script/script.c
parentMy previous two attempts at fixing the "scrolling region" problem were wrong. (diff)
downloadwireguard-openbsd-b638aa94715d7c4b461552b23f350ea53e1afd5a.tar.xz
wireguard-openbsd-b638aa94715d7c4b461552b23f350ea53e1afd5a.zip
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/script/script.c')
-rw-r--r--usr.bin/script/script.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c
index 187c4ec7ec9..e39c0030bc6 100644
--- a/usr.bin/script/script.c
+++ b/usr.bin/script/script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: script.c,v 1.12 2000/04/16 20:28:54 espie Exp $ */
+/* $OpenBSD: script.c,v 1.13 2000/06/30 16:00:20 millert Exp $ */
/* $NetBSD: script.c,v 1.3 1994/12/21 08:55:43 jtc Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)script.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: script.c,v 1.12 2000/04/16 20:28:54 espie Exp $";
+static char rcsid[] = "$OpenBSD: script.c,v 1.13 2000/06/30 16:00:20 millert Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -115,7 +115,7 @@ main(argc, argv)
fname = "typescript";
if ((fscript = fopen(fname, aflg ? "a" : "w")) == NULL)
- err(1, fname);
+ err(1, "%s", fname);
(void)tcgetattr(STDIN_FILENO, &tt);
(void)ioctl(STDIN_FILENO, TIOCGWINSZ, &win);