Fix infinite loop in circuit_expire_bulding

Fixes bug 7663; bug introduced in 42e3c04a7a.  Not in any
released version of Tor.
This commit is contained in:
Nick Mathewson 2012-12-07 14:08:07 -05:00
parent 504d4aa8c6
commit cd4f56a37c

View File

@ -382,8 +382,10 @@ circuit_expire_building(void)
* See bug #3443. */ * See bug #3443. */
while (next_circ) { while (next_circ) {
if (!CIRCUIT_IS_ORIGIN(next_circ) || /* didn't originate here */ 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; continue;
}
if (TO_ORIGIN_CIRCUIT(next_circ)->has_opened && if (TO_ORIGIN_CIRCUIT(next_circ)->has_opened &&
next_circ->state == CIRCUIT_STATE_OPEN && next_circ->state == CIRCUIT_STATE_OPEN &&