[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r12911: Fix a crash when we fetch a descriptor that turns out to be (in tor/trunk: . src/or)



Author: arma
Date: 2007-12-21 17:58:22 -0500 (Fri, 21 Dec 2007)
New Revision: 12911

Modified:
   tor/trunk/ChangeLog
   tor/trunk/src/or/circuitbuild.c
Log:
Fix a crash when we fetch a descriptor that turns out to be
unexpected (it used to be in our networkstatus when we started
fetching it, but it isn't in our current networkstatus), and we
aren't using bridges. Bugfix on 0.2.0.x.


Modified: tor/trunk/ChangeLog
===================================================================
--- tor/trunk/ChangeLog	2007-12-21 12:23:46 UTC (rev 12910)
+++ tor/trunk/ChangeLog	2007-12-21 22:58:22 UTC (rev 12911)
@@ -1,4 +1,10 @@
 Changes in version 0.2.0.14-alpha - 2007-12-??
+  o Major bugfixes:
+    - Fix a crash when we fetch a descriptor that turns out to be
+      unexpected (it used to be in our networkstatus when we started
+      fetching it, but it isn't in our current networkstatus), and we
+      aren't using bridges. Bugfix on 0.2.0.x.
+
   o Minor bugfixes:
     - Make the unit tests build again.
 

Modified: tor/trunk/src/or/circuitbuild.c
===================================================================
--- tor/trunk/src/or/circuitbuild.c	2007-12-21 12:23:46 UTC (rev 12910)
+++ tor/trunk/src/or/circuitbuild.c	2007-12-21 22:58:22 UTC (rev 12911)
@@ -2853,6 +2853,8 @@
 static bridge_info_t *
 routerinfo_get_configured_bridge(routerinfo_t *ri)
 {
+  if (!bridge_list)
+    return NULL;
   SMARTLIST_FOREACH(bridge_list, bridge_info_t *, bridge,
     {
       if (tor_digest_is_zero(bridge->identity) &&