summaryrefslogtreecommitdiffstats
path: root/lib/libcompat/regexp/regerror.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2000-06-30 16:00:03 +0000
committermillert <millert@openbsd.org>2000-06-30 16:00:03 +0000
commitb638aa94715d7c4b461552b23f350ea53e1afd5a (patch)
treeaa7fbc4972a0b2e67a2a10a222aefffd0c85c9a5 /lib/libcompat/regexp/regerror.c
parentMy previous two attempts at fixing the "scrolling region" problem were wrong. (diff)
downloadwireguard-openbsd-b638aa94715d7c4b461552b23f350ea53e1afd5a.tar.xz
wireguard-openbsd-b638aa94715d7c4b461552b23f350ea53e1afd5a.zip
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 'lib/libcompat/regexp/regerror.c')
-rw-r--r--lib/libcompat/regexp/regerror.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libcompat/regexp/regerror.c b/lib/libcompat/regexp/regerror.c
index c1b96806d47..3f129ea329b 100644
--- a/lib/libcompat/regexp/regerror.c
+++ b/lib/libcompat/regexp/regerror.c
@@ -1,6 +1,6 @@
-/* $OpenBSD: regerror.c,v 1.3 1999/08/02 17:10:47 downsj Exp $ */
+/* $OpenBSD: regerror.c,v 1.4 2000/06/30 16:00:06 millert Exp $ */
#ifndef lint
-static char *rcsid = "$OpenBSD: regerror.c,v 1.3 1999/08/02 17:10:47 downsj Exp $";
+static char *rcsid = "$OpenBSD: regerror.c,v 1.4 2000/06/30 16:00:06 millert Exp $";
#endif /* not lint */
#include <regexp.h>
@@ -15,7 +15,7 @@ v8_regerror(s)
if (_new_regerror != NULL)
_new_regerror(s);
else
- warnx(s);
+ warnx("%s", s);
return;
}