diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-06-30 16:00:30 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-06-30 16:00:30 +0000 |
commit | b643bb9badf4a995d989b8daf3e33ba8ee6ffda2 (patch) | |
tree | 87720e8aa60a5b4230d0072dfd2b3d422d7dd1cd /usr.bin/uniq | |
parent | 46239127052c30fac93140fbe021cdd151fdac8a (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/uniq')
-rw-r--r-- | usr.bin/uniq/uniq.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/uniq/uniq.c b/usr.bin/uniq/uniq.c index 8e81fdde0ea..82c0cfa572d 100644 --- a/usr.bin/uniq/uniq.c +++ b/usr.bin/uniq/uniq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uniq.c,v 1.5 1997/07/25 22:21:40 mickey Exp $ */ +/* $OpenBSD: uniq.c,v 1.6 2000/06/30 16:00:22 millert Exp $ */ /* $NetBSD: uniq.c,v 1.7 1995/08/31 22:03:48 jtc Exp $ */ /* @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)uniq.c 8.3 (Berkeley) 5/4/95"; #endif -static char rcsid[] = "$OpenBSD: uniq.c,v 1.5 1997/07/25 22:21:40 mickey Exp $"; +static char rcsid[] = "$OpenBSD: uniq.c,v 1.6 2000/06/30 16:00:22 millert Exp $"; #endif /* not lint */ #include <errno.h> @@ -210,7 +210,7 @@ file(name, mode) FILE *fp; if ((fp = fopen(name, mode)) == NULL) - err(1, name); + err(1, "%s", name); return(fp); } |