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/finger | |
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/finger')
-rw-r--r-- | usr.bin/finger/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 7eeaf066450..ffcee4d063f 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.11 1999/08/17 09:13:15 millert Exp $ */ +/* $OpenBSD: util.c,v 1.12 2000/06/30 16:00:13 millert Exp $ */ /* * Copyright (c) 1989 The Regents of the University of California. @@ -39,7 +39,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)util.c 5.14 (Berkeley) 1/17/91";*/ -static char rcsid[] = "$OpenBSD: util.c,v 1.11 1999/08/17 09:13:15 millert Exp $"; +static char rcsid[] = "$OpenBSD: util.c,v 1.12 2000/06/30 16:00:13 millert Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -114,7 +114,7 @@ userinfo(pn, pw) pn->mailrecv = -1; /* -1 == not_valid */ if (stat(tbuf, &sb) < 0) { if (errno != ENOENT) { - warn(tbuf); + warn("%s", tbuf); return; } } else if (sb.st_size != 0) { |