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/fdformat/fdformat.c | |
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/fdformat/fdformat.c')
-rw-r--r-- | usr.sbin/fdformat/fdformat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/fdformat/fdformat.c b/usr.sbin/fdformat/fdformat.c index ac9a07348b3..ec83e0c109d 100644 --- a/usr.sbin/fdformat/fdformat.c +++ b/usr.sbin/fdformat/fdformat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdformat.c,v 1.8 1998/08/13 05:36:56 deraadt Exp $ */ +/* $OpenBSD: fdformat.c,v 1.9 2000/06/30 16:00:25 millert Exp $ */ /* * Copyright (C) 1992-1994 by Joerg Wunsch, Dresden @@ -247,7 +247,7 @@ main(argc, argv) usage(); if ((fd = opendev(argv[optind], O_RDWR, OPENDEV_PART, &devname)) < 0) - err(1, devname); + err(1, "%s", devname); if (ioctl(fd, FD_GTYPE, &fdt) < 0) errx(1, "not a floppy disk: %s", devname); |