mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Don't call errx() without a format string, to protect against possible
% characters in localized error messages from ipsec_strerror(). Obtained from: OpenBSD
This commit is contained in:
parent
d94e8c62d6
commit
0af87587a7
1 changed files with 4 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue