]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Check ewma_enabled before doing circ-has-become-inactive check
authorNick Mathewson <nickm@torproject.org>
Wed, 11 Jul 2012 13:57:58 +0000 (09:57 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 18 Jul 2012 14:28:55 +0000 (10:28 -0400)
This avoids a possible crash bug in flush_from_first_active_circuit.

Fixes bug 6341; bugfix on 0.2.2.7-alpha.

Bug reported and fixed by a pseudonymous user on IRC.

changes/bug6341 [new file with mode: 0644]
src/or/relay.c

diff --git a/changes/bug6341 b/changes/bug6341
new file mode 100644 (file)
index 0000000..04e52c7
--- /dev/null
@@ -0,0 +1,5 @@
+  o Major bugfixes:
+    - Fix a possible crash bug when checking for deactivated circuits
+      in connection_or_flush_from_first_active_circuit(). Fixes bug 
+      6341; bugfix on 0.2.2.7-alpha. Bug report and fix received
+      pseudonymously.
index 3e418ea13f8a0b6e2a99033c95ae421dc193cae3..b1913e766fa030707e7f9b7af87ef782450a6ebc 100644 (file)
@@ -2464,7 +2464,7 @@ connection_or_flush_from_first_active_circuit(or_connection_t *conn, int max,
       tor_assert(tmp == cell_ewma);
       add_cell_ewma_to_conn(conn, cell_ewma);
     }
-    if (circ != conn->active_circuits) {
+    if (!ewma_enabled && circ != conn->active_circuits) {
       /* If this happens, the current circuit just got made inactive by
        * a call in connection_write_to_buf().  That's nothing to worry about:
        * circuit_make_inactive_on_conn() already advanced conn->active_circuits