mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 06:48:05 +01:00
Move router lookup to _after_ we assert that its argument is set
A previous commit in the 5527 branch had moved router_get_mutable_by_digest(digest_rcvd) to happen before we did tor_assert(digest_rcvd), which would have defeated the purpose of the assert.
This commit is contained in:
parent
3031def726
commit
491ffa540f
1 changed files with 3 additions and 1 deletions
|
@ -3271,11 +3271,13 @@ dirserv_orconn_tls_done(const char *address,
|
||||||
uint16_t or_port,
|
uint16_t or_port,
|
||||||
const char *digest_rcvd)
|
const char *digest_rcvd)
|
||||||
{
|
{
|
||||||
routerinfo_t *ri = router_get_mutable_by_digest(digest_rcvd);
|
routerinfo_t *ri;
|
||||||
time_t now = time(NULL);
|
time_t now = time(NULL);
|
||||||
tor_assert(address);
|
tor_assert(address);
|
||||||
tor_assert(digest_rcvd);
|
tor_assert(digest_rcvd);
|
||||||
|
|
||||||
|
ri = router_get_mutable_by_digest(digest_rcvd);
|
||||||
|
|
||||||
if (ri == NULL)
|
if (ri == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue