[or-cvs] Fix a segfault when starting a dir cache

Nick Mathewson nickm at seul.org
Thu Aug 25 20:45:55 UTC 2005


Update of /home/or/cvsroot/tor/src/or
In directory moria:/home/nickm/src/tor/src/or

Modified Files:
	dirserv.c 
Log Message:
Fix a segfault when starting a dir cache

Index: dirserv.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/dirserv.c,v
retrieving revision 1.180
retrieving revision 1.181
diff -u -d -r1.180 -r1.181
--- dirserv.c	25 Aug 2005 20:33:17 -0000	1.180
+++ dirserv.c	25 Aug 2005 20:45:53 -0000	1.181
@@ -631,6 +631,8 @@
  */
 void
 dirserv_router_has_begun_reachability_testing(char *digest, time_t now) {
+  if (!descriptor_list)
+    return;
   SMARTLIST_FOREACH(descriptor_list, routerinfo_t *, ri,
   {
     if (!memcmp(ri->identity_digest, digest, DIGEST_LEN))



More information about the tor-commits mailing list