]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Avoid crash in any_pending_bridge_descriptor_fetches
authorNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 20:17:41 +0000 (15:17 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 20:17:41 +0000 (15:17 -0500)
This is based on shitlei's fix for bug2629, with extra parens removed.
Fixes bug 2629, bugfix on 0.2.1.2-alpha.

changes/bug2629 [new file with mode: 0644]
src/or/circuitbuild.c

diff --git a/changes/bug2629 b/changes/bug2629
new file mode 100644 (file)
index 0000000..87817cf
--- /dev/null
@@ -0,0 +1,5 @@
+  o Minor bugfixes
+    - Fix a crash bug that could occur occasionally when a client was
+      configured with a large number of bridges.  Fixes bug 2629; bugfix
+      on 0.2.1.2-alpha.  Bugfix by trac user "shitlei".
+
index 065eb052ff536188346309f7d1ba6c22411dd495..76713e676f29de8aece355f358b1048899a77b8e 100644 (file)
@@ -3200,7 +3200,8 @@ any_pending_bridge_descriptor_fetches(void)
         conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC &&
         TO_DIR_CONN(conn)->router_purpose == ROUTER_PURPOSE_BRIDGE &&
         !conn->marked_for_close &&
-        conn->linked && !conn->linked_conn->marked_for_close) {
+        conn->linked &&
+        conn->linked_conn && !conn->linked_conn->marked_for_close) {
       log_debug(LD_DIR, "found one: %s", conn->address);
       return 1;
     }