From dd8f16beb555b8d46a7d5157743c762fb4a37068 Mon Sep 17 00:00:00 2001 From: Karsten Loesing Date: Sat, 29 Aug 2009 19:41:08 +0200 Subject: Avoid segfault when accessing hidden service. --- src/or/rendclient.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/or/rendclient.c b/src/or/rendclient.c index a5d7c1016..5e3c20e80 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -94,6 +94,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, } }); if (!intro_key) { + int num_intro_points = smartlist_len(entry->parsed->intro_nodes); if (rend_cache_lookup_entry(introcirc->rend_data->onion_address, 0, &entry) > 0) { log_warn(LD_BUG, "We have both a v0 and a v2 rend desc for this " @@ -109,7 +110,7 @@ rend_client_send_introduction(origin_circuit_t *introcirc, } else { log_warn(LD_BUG, "Internal error: could not find intro key; we " "only have a v2 rend desc with %d intro points.", - smartlist_len(entry->parsed->intro_nodes)); + num_intro_points); goto err; } } -- cgit v1.2.3