aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-09-20 03:07:11 +0000
committerRoger Dingledine <arma@torproject.org>2004-09-20 03:07:11 +0000
commit802b203ff167df4aaf5c26bda1cf6f407530e6d7 (patch)
treed95a794d4b5d2eb2e5efaead2a6faf456804eaef /src
parenteade496dcd972f5b63c89c020fdfe68e78cf5ddd (diff)
downloadtor-802b203ff167df4aaf5c26bda1cf6f407530e6d7.tar
tor-802b203ff167df4aaf5c26bda1cf6f407530e6d7.tar.gz
fix a rare seg fault for people running hidden services on
intermittent connections svn:r2353
Diffstat (limited to 'src')
-rw-r--r--src/or/rendservice.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index cfc584112..3a8fdbf66 100644
--- a/src/or/rendservice.c
+++ b/src/or/rendservice.c
@@ -264,6 +264,11 @@ static void rend_service_update_descriptor(rend_service_t *service)
d->intro_points = tor_malloc(sizeof(char*)*n);
for (i=0; i < n; ++i) {
router = router_get_by_nickname(smartlist_get(service->intro_nodes, i));
+ if(!router) {
+ log_fn(LOG_WARN,"Router '%s' not found. Skipping.",
+ (char*)smartlist_get(service->intro_nodes, i));
+ continue;
+ }
circ = find_intro_circuit(router, service->pk_digest);
if (circ && circ->purpose == CIRCUIT_PURPOSE_S_INTRO) {
/* We have an entirely established intro circuit. */
@@ -718,6 +723,7 @@ find_intro_circuit(routerinfo_t *router, const char *pk_digest)
{
circuit_t *circ = NULL;
+ tor_assert(router);
while ((circ = circuit_get_next_by_pk_and_purpose(circ,pk_digest,
CIRCUIT_PURPOSE_S_INTRO))) {
tor_assert(circ->cpath);