From dc7d1ef2f3cc57d31a70991827c65fe79dbcad47 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 20 Mar 2004 20:21:20 +0000 Subject: [PATCH] make servers not crash when they rep-hist-note circuits that don't start at them svn:r1317 --- trunk/src/or/circuit.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trunk/src/or/circuit.c b/trunk/src/or/circuit.c index 9c07532ff2..45b10ee252 100644 --- a/trunk/src/or/circuit.c +++ b/trunk/src/or/circuit.c @@ -833,6 +833,14 @@ circuit_rep_hist_note_result(circuit_t *circ) char *prev_nickname = NULL; routerinfo_t *router; hop = circ->cpath; + if(!hop) { + /* XXX + * if !hop, then we're not the beginning of this circuit. + * for now, just forget about it. later, we should remember when + * extends-through-us failed, too. + */ + return; + } if (options.ORPort) { prev_nickname = options.Nickname; }