diff options
author | kris <kris@FreeBSD.org> | 2000-08-05 06:24:41 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-08-05 06:24:41 +0000 |
commit | 7f5ac0f1071e0c752e0a9a55b7c96b3f605cc9b3 (patch) | |
tree | d89c534ddda22ceea71665283bd9a5ac0e7d4bc8 /sbin/ping6/ping6.c | |
parent | b1da3ba3c9fcdd3bfd892540fb1f39c9a3f12264 (diff) | |
download | FreeBSD-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/ping6/ping6.c')
-rw-r--r-- | sbin/ping6/ping6.c | 8 |
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"); |