[or-cvs] fix a seg fault when you finish connecting to a server but

arma at seul.org arma at seul.org
Sun Dec 18 22:59:50 UTC 2005


Update of /home2/or/cvsroot/tor/src/or
In directory moria:/home/arma/work/onion/cvs/tor/src/or

Modified Files:
	circuitbuild.c 
Log Message:
fix a seg fault when you finish connecting to a server but
at that moment you dump his server descriptor, and you also
happen to be logging at loglevel info.
(found by weasel)


Index: circuitbuild.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/circuitbuild.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -p -d -r1.181 -r1.182
--- circuitbuild.c	14 Dec 2005 20:40:39 -0000	1.181
+++ circuitbuild.c	18 Dec 2005 22:59:47 -0000	1.182
@@ -584,7 +584,8 @@ circuit_send_next_onion_skin(circuit_t *
     circ->cpath->state = CPATH_STATE_AWAITING_KEYS;
     circuit_set_state(circ, CIRCUIT_STATE_BUILDING);
     info(LD_CIRC,"First hop: finished sending %s cell to '%s'",
-         fast ? "CREATE_FAST" : "CREATE", router->nickname);
+         fast ? "CREATE_FAST" : "CREATE",
+         router ?  router->nickname : "<unnamed>");
   } else {
     tor_assert(circ->cpath->state == CPATH_STATE_OPEN);
     tor_assert(circ->state == CIRCUIT_STATE_BUILDING);



More information about the tor-commits mailing list