Fix array bounds bug in upstream_select

This commit is contained in:
Neil Cook 2017-07-31 22:51:24 +01:00
parent 2d7d6581b4
commit 1555c432f5
1 changed files with 1 additions and 1 deletions

View File

@ -1962,7 +1962,7 @@ upstream_select(getdns_network_req *netreq)
return &upstreams->upstreams[i];
}
i+=GETDNS_UPSTREAM_TRANSPORTS;
if (i > upstreams->count)
if (i >= upstreams->count)
i = 0;
} while (i != upstreams->current_udp);