Additional sanity check in filter_servers().

This commit is contained in:
Simon Kelley
2025-06-06 23:33:25 +01:00
parent 6ce7f2d55a
commit 14e81b6976

View File

@@ -343,7 +343,7 @@ int filter_servers(int seed, int flags, int *lowout, int *highout)
else else
{ {
/* If we want a server for a particular domain, and this one isn't, return nothing. */ /* If we want a server for a particular domain, and this one isn't, return nothing. */
if (nlow != nhigh && (flags & F_DOMAINSRV) && daemon->serverarray[nlow]->domain_len == 0) if (nlow < daemon->serverarraysz && nlow != nhigh && (flags & F_DOMAINSRV) && daemon->serverarray[nlow]->domain_len == 0)
nlow = nhigh; nlow = nhigh;
} }
} }