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.sbin/pccon | |
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.sbin/pccon')
-rw-r--r-- | usr.sbin/pccon/pccon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pccon/pccon.c b/usr.sbin/pccon/pccon.c index 382b9a8f995..6f0da89ce22 100644 --- a/usr.sbin/pccon/pccon.c +++ b/usr.sbin/pccon/pccon.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccon.c,v 1.1 1997/03/03 11:59:12 downsj Exp $ */ +/* $OpenBSD: pccon.c,v 1.2 2000/06/30 16:00:29 millert Exp $ */ /* * Copyright (c) 1997, Jason Downs. All rights reserved. @@ -69,7 +69,7 @@ int main(argc, argv) fd = open (dev, O_RDWR); if (fd < 0) - err (1, dev); + err (1, "%s", dev); if (blank >= 0) { if (ioctl(fd, CONSOLE_SET_BLANK, &blank) < 0) |