Browse Source

make servers not crash when they rep-hist-note circuits that don't start at them

svn:r1317
Roger Dingledine 20 years ago
parent
commit
4f0bad280d
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/or/circuit.c

+ 8 - 0
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;
   }