summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-08-05 06:24:41 +0000
committerkris <kris@FreeBSD.org>2000-08-05 06:24:41 +0000
commit7f5ac0f1071e0c752e0a9a55b7c96b3f605cc9b3 (patch)
treed89c534ddda22ceea71665283bd9a5ac0e7d4bc8 /sbin
parentb1da3ba3c9fcdd3bfd892540fb1f39c9a3f12264 (diff)
downloadFreeBSD-src-7f5ac0f1071e0c752e0a9a55b7c96b3f605cc9b3.zip
FreeBSD-src-7f5ac0f1071e0c752e0a9a55b7c96b3f605cc9b3.tar.gz
Don't call errx() without a format string, to protect against possible
% characters in localized error messages from ipsec_strerror(). Obtained from: OpenBSD
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ping6/ping6.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c
index 06e6839..e258013 100644
--- a/sbin/ping6/ping6.c
+++ b/sbin/ping6/ping6.c
@@ -547,9 +547,9 @@ main(argc, argv)
#ifdef IPSEC_POLICY_IPSEC
if (options & F_POLICY) {
if (setpolicy(s, policy_in) < 0)
- errx(1, ipsec_strerror());
+ errx(1, "%s", ipsec_strerror());
if (setpolicy(s, policy_out) < 0)
- errx(1, ipsec_strerror());
+ errx(1, "%s", ipsec_strerror());
}
#else
if (options & F_AUTHHDR) {
@@ -727,7 +727,7 @@ main(argc, argv)
struct addrinfo *iaip;
if ((error = getaddrinfo(argv[hops], NULL, &hints, &iaip)))
- errx(1, gai_strerror(error));
+ errx(1, "%s", gai_strerror(error));
if (SIN6(res->ai_addr)->sin6_family != AF_INET6)
errx(1,
"bad addr family of an intermediate addr");
@@ -1901,7 +1901,7 @@ setpolicy(so, policy)
buf = ipsec_set_policy(policy, strlen(policy));
if (buf == NULL)
- errx(1, ipsec_strerror());
+ errx(1, "%s", ipsec_strerror());
if (setsockopt(s, IPPROTO_IPV6, IPV6_IPSEC_POLICY,
buf, ipsec_get_policylen(buf)) < 0)
warnx("Unable to set IPSec policy");
OpenPOWER on IntegriCloud