]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix infinite loop in circuit_expire_bulding
authorNick Mathewson <nickm@torproject.org>
Fri, 7 Dec 2012 19:08:07 +0000 (14:08 -0500)
committerNick Mathewson <nickm@torproject.org>
Fri, 7 Dec 2012 19:08:07 +0000 (14:08 -0500)
Fixes bug 7663; bug introduced in 42e3c04a7a5fb47a9.  Not in any
released version of Tor.

src/or/circuituse.c

index a329afb6fa1c8312e3f204bbf6f663fbdae6ce05..e14f9d03ca37793f9e2e7ef8c97b9c12e0284898 100644 (file)
@@ -382,8 +382,10 @@ circuit_expire_building(void)
    * See bug #3443. */
   while (next_circ) {
     if (!CIRCUIT_IS_ORIGIN(next_circ) || /* didn't originate here */
-        next_circ->marked_for_close) /* don't mess with marked circs */
+        next_circ->marked_for_close) { /* don't mess with marked circs */
+      next_circ = next_circ->next;
       continue;
+    }
 
     if (TO_ORIGIN_CIRCUIT(next_circ)->has_opened &&
         next_circ->state == CIRCUIT_STATE_OPEN &&