diff options
author | Linus Nordberg <linus@nordberg.se> | 2012-05-08 14:53:59 +0200 |
---|---|---|
committer | Linus Nordberg <linus@torproject.org> | 2012-07-19 18:21:20 +0200 |
commit | c1ff07440e67f1ae690acbfceddb6174fdb092df (patch) | |
tree | c4aae4b6b171f7a46bd5f85efb8aba04c2e5a279 | |
parent | 631ec5c4fe4d5535d91e8e1e3597fbaa687b8790 (diff) | |
download | tor-c1ff07440e67f1ae690acbfceddb6174fdb092df.tar.gz tor-c1ff07440e67f1ae690acbfceddb6174fdb092df.zip |
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.
-rw-r--r-- | src/or/dirserv.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 8f65b7fce4..3518d9ea57 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -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. */ |