2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

Merge branch '1808-race-in-resolver-fetch-fix-restore-client' into 'master'

ensure fctx->clientstr is null-terminated

Closes #1808

See merge request isc-projects/bind9!3675
This commit is contained in:
Ondřej Surý
2020-06-06 05:02:12 +00:00

View File

@@ -4996,7 +4996,7 @@ fctx_create(dns_resolver_t *res, const dns_name_t *name, dns_rdatatype_t type,
isc_sockaddr_format(client, fctx->clientstr, isc_sockaddr_format(client, fctx->clientstr,
sizeof(fctx->clientstr)); sizeof(fctx->clientstr));
} else { } else {
memmove(fctx->clientstr, "<unknown>", sizeof("<unknown")); strlcpy(fctx->clientstr, "<unknown>", sizeof(fctx->clientstr));
} }
fctx->ns_ttl = 0; fctx->ns_ttl = 0;
fctx->ns_ttl_ok = false; fctx->ns_ttl_ok = false;