summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraaron <aaron@openbsd.org>2000-09-30 16:06:33 +0000
committeraaron <aaron@openbsd.org>2000-09-30 16:06:33 +0000
commit2cc28a79344a9da508a3408c51a6c5cee808f0b0 (patch)
tree6592b9f70cdf613fb418ed0d1d46d863b2159210
parentWhoops, forgot to list the 3c555 device ID under media selection parts. (diff)
downloadwireguard-openbsd-2cc28a79344a9da508a3408c51a6c5cee808f0b0.tar.xz
wireguard-openbsd-2cc28a79344a9da508a3408c51a6c5cee808f0b0.zip
Some format string problems that were missed during initial audit; deraadt@ and
millert@ ok
-rw-r--r--sbin/ccdconfig/ccdconfig.c4
-rw-r--r--sbin/fsck_ext2fs/utilities.c6
-rw-r--r--sbin/fsck_ffs/utilities.c6
-rw-r--r--usr.sbin/config/exec_aout.c8
-rw-r--r--usr.sbin/config/exec_ecoff.c8
-rw-r--r--usr.sbin/config/exec_elf.c8
-rw-r--r--usr.sbin/gspa/gspa/gspa.c2
-rw-r--r--usr.sbin/wsconscfg/wsconscfg.c4
8 files changed, 23 insertions, 23 deletions
diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c
index a187a4da5ea..e4da9d2ce91 100644
--- a/sbin/ccdconfig/ccdconfig.c
+++ b/sbin/ccdconfig/ccdconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ccdconfig.c,v 1.13 2000/06/30 16:00:07 millert Exp $ */
+/* $OpenBSD: ccdconfig.c,v 1.14 2000/09/30 16:06:33 aaron Exp $ */
/* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */
/*-
@@ -491,7 +491,7 @@ do_io(path, cmd, cciop)
#define KVM_ABORT(kd, str) { \
(void)kvm_close((kd)); \
- warnx((str)); \
+ warnx("%s", (str)); \
warnx("%s", kvm_geterr((kd))); \
return (1); \
}
diff --git a/sbin/fsck_ext2fs/utilities.c b/sbin/fsck_ext2fs/utilities.c
index 5f4739a3ef4..80b784e044a 100644
--- a/sbin/fsck_ext2fs/utilities.c
+++ b/sbin/fsck_ext2fs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.5 2000/04/26 23:26:07 jasoni Exp $ */
+/* $OpenBSD: utilities.c,v 1.6 2000/09/30 16:06:34 aaron Exp $ */
/* $NetBSD: utilities.c,v 1.1 1997/06/11 11:22:02 bouyer Exp $ */
/*
@@ -42,7 +42,7 @@ static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#if 0
static char rcsid[] = "$NetBSD: utilities.c,v 1.1 1997/06/11 11:22:02 bouyer Exp $";
#else
-static char rcsid[] = "$OpenBSD: utilities.c,v 1.5 2000/04/26 23:26:07 jasoni Exp $";
+static char rcsid[] = "$OpenBSD: utilities.c,v 1.6 2000/09/30 16:06:34 aaron Exp $";
#endif
#endif
#endif /* not lint */
@@ -515,7 +515,7 @@ dofix(idesc, msg)
if (idesc->id_type == DATA)
direrror(idesc->id_number, msg);
else
- pwarn(msg);
+ pwarn("%s", msg);
if (preen) {
printf(" (SALVAGED)\n");
idesc->id_fix = FIX;
diff --git a/sbin/fsck_ffs/utilities.c b/sbin/fsck_ffs/utilities.c
index ac235020145..8e13cd8b94a 100644
--- a/sbin/fsck_ffs/utilities.c
+++ b/sbin/fsck_ffs/utilities.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utilities.c,v 1.7 1999/03/01 07:45:18 d Exp $ */
+/* $OpenBSD: utilities.c,v 1.8 2000/09/30 16:06:34 aaron Exp $ */
/* $NetBSD: utilities.c,v 1.18 1996/09/27 22:45:20 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)utilities.c 8.1 (Berkeley) 6/5/93";
#else
-static char rcsid[] = "$OpenBSD: utilities.c,v 1.7 1999/03/01 07:45:18 d Exp $";
+static char rcsid[] = "$OpenBSD: utilities.c,v 1.8 2000/09/30 16:06:34 aaron Exp $";
#endif
#endif /* not lint */
@@ -530,7 +530,7 @@ dofix(idesc, msg)
if (idesc->id_type == DATA)
direrror(idesc->id_number, msg);
else
- pwarn(msg);
+ pwarn("%s", msg);
if (preen) {
printf(" (SALVAGED)\n");
idesc->id_fix = FIX;
diff --git a/usr.sbin/config/exec_aout.c b/usr.sbin/config/exec_aout.c
index 0647a77baef..1e5c4c2f85d 100644
--- a/usr.sbin/config/exec_aout.c
+++ b/usr.sbin/config/exec_aout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_aout.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $ */
+/* $OpenBSD: exec_aout.c,v 1.2 2000/09/30 16:06:34 aaron Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.2 2000/09/30 16:06:34 aaron Exp $";
#endif
#include <err.h>
@@ -98,7 +98,7 @@ aout_loadkernel(file)
off_t cur,end;
if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0)
- err(1, file, errno);
+ err(1, "%s", file);
if (read(fd, (char *)&aout_ex, sizeof(aout_ex)) != sizeof(aout_ex))
errx(1, "can't read a.out header");
@@ -136,7 +136,7 @@ aout_savekernel(outfile)
int fd;
if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0)
- err(1, outfile, errno);
+ err(1, "%s", outfile);
if (write(fd, aout_p, aout_psz) != aout_psz)
errx(1, "can't write a.out text and data");
diff --git a/usr.sbin/config/exec_ecoff.c b/usr.sbin/config/exec_ecoff.c
index f9c9089817a..362ea3e12d7 100644
--- a/usr.sbin/config/exec_ecoff.c
+++ b/usr.sbin/config/exec_ecoff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_ecoff.c,v 1.2 1999/10/05 18:14:44 deraadt Exp $ */
+/* $OpenBSD: exec_ecoff.c,v 1.3 2000/09/30 16:06:34 aaron Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: exec_ecoff.c,v 1.2 1999/10/05 18:14:44 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: exec_ecoff.c,v 1.3 2000/09/30 16:06:34 aaron Exp $";
#endif
#include <err.h>
@@ -101,7 +101,7 @@ ecoff_loadkernel(file)
off_t beg,cur,end;
if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0)
- err(1, file, errno);
+ err(1, "%s" file);
if (read(fd, (char *)&ecoff_ex, sizeof(ecoff_ex)) != sizeof(ecoff_ex))
errx(1, "can't read ecoff header");
@@ -144,7 +144,7 @@ ecoff_savekernel(outfile)
int fd;
if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0)
- err(1, outfile, errno);
+ err(1, "%s", outfile);
if (write(fd, ecoff_b, ecoff_bsz) != ecoff_bsz)
errx(1, "can't write beginning of file %s",outfile);
diff --git a/usr.sbin/config/exec_elf.c b/usr.sbin/config/exec_elf.c
index 1446fa27012..80c1aa57673 100644
--- a/usr.sbin/config/exec_elf.c
+++ b/usr.sbin/config/exec_elf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $ */
+/* $OpenBSD: exec_elf.c,v 1.2 2000/09/30 16:06:34 aaron Exp $ */
/*
* Copyright (c) 1999 Mats O Jansson. All rights reserved.
@@ -30,7 +30,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: exec_elf.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: exec_elf.c,v 1.2 2000/09/30 16:06:34 aaron Exp $";
#endif
#include <err.h>
@@ -130,7 +130,7 @@ elf_loadkernel(file)
Elf32_Shdr *s;
if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0)
- err(1, file, errno);
+ err(1, "%s", file);
if (read(fd, (char *)&elf_ex, sizeof(elf_ex)) != sizeof(elf_ex))
errx(1, "can't read elf header");
@@ -164,7 +164,7 @@ elf_savekernel(outfile)
int fd;
if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0)
- err(1, outfile, errno);
+ err(1, "%s", outfile);
if (write(fd, elf_total, elf_size) != elf_size)
errx(1, "can't write file %s", outfile);
diff --git a/usr.sbin/gspa/gspa/gspa.c b/usr.sbin/gspa/gspa/gspa.c
index 94cbc82c38b..917190713eb 100644
--- a/usr.sbin/gspa/gspa/gspa.c
+++ b/usr.sbin/gspa/gspa/gspa.c
@@ -249,7 +249,7 @@ yyerror(char *err)
{
extern char *lineptr;
- perr(err);
+ perr("%s", err);
longjmp(synerrjmp, 1);
}
diff --git a/usr.sbin/wsconscfg/wsconscfg.c b/usr.sbin/wsconscfg/wsconscfg.c
index a6dd73ceccb..092587ebb8c 100644
--- a/usr.sbin/wsconscfg/wsconscfg.c
+++ b/usr.sbin/wsconscfg/wsconscfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wsconscfg.c,v 1.1 2000/07/02 01:25:24 mickey Exp $ */
+/* $OpenBSD: wsconscfg.c,v 1.2 2000/09/30 16:06:35 aaron Exp $ */
/* $NetBSD: wsconscfg.c,v 1.4 1999/07/29 18:24:10 augustss Exp $ */
/*
@@ -120,7 +120,7 @@ main(argc, argv)
wsfd = open(wsdev, O_RDWR, 0);
if (wsfd < 0)
- err(2, wsdev);
+ err(2, "%s", wsdev);
if (kbd) {
if (mux)