mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
Don't assume that a node has routerinfo.
We can end up in dirserv_orconn_tls_done() with a node missing routerinfo in at least two cases -- command_process_certs_cell() and connection_or_check_valid_tls_handshake() -- and probably more.
This commit is contained in:
parent
631ec5c4fe
commit
c1ff07440e
@ -3284,10 +3284,9 @@ dirserv_orconn_tls_done(const char *address,
|
||||
tor_assert(digest_rcvd);
|
||||
|
||||
node = node_get_mutable_by_id(digest_rcvd);
|
||||
if (node == NULL)
|
||||
if (node == NULL || node->ri == NULL)
|
||||
return;
|
||||
ri = node->ri;
|
||||
tor_assert(ri);
|
||||
|
||||
if (!strcasecmp(address, ri->address) && or_port == ri->or_port) {
|
||||
/* Found the right router. */
|
||||
|
Loading…
Reference in New Issue
Block a user