summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-02-24 09:36:15 +0100
committerSebastian Hahn <sebastian@torproject.org>2010-02-26 05:53:26 +0100
commit86828e2004058d01fba09215a44d51d53f82e5c3 (patch)
treed065e821a212d07699527aba34fa02f8026bf87c
parentf36c36f4a881d15d2187efbc59becb5195d0bf09 (diff)
downloadtor-86828e2004058d01fba09215a44d51d53f82e5c3.tar.gz
tor-86828e2004058d01fba09215a44d51d53f82e5c3.zip
Proper NULL checking in circuit_list_path_impl()
Another dereference-then-NULL-check sequence. No reports of this bug triggered in the wild. Fixes bugreport 1256. Thanks to ekir for discovering and reporting this bug.
-rw-r--r--ChangeLog2
-rw-r--r--src/or/circuitbuild.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 525a00b378..8ec64c0538 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,8 @@ Changes in version 0.2.1.25 - 2010-??-??
- Fix a dereference-then-NULL-check sequence when publishing
descriptors. Bugfix on tor-0.2.1.5-alpha. Discovered by ekir,
fixes bug 1255.
+ - Fix another dereference-then-NULL-check sequence. Bugfix on
+ 0.2.1.14-rc. Discovered by ekir, fixes bug 1256.
Changes in version 0.2.1.24 - 2010-02-21
Tor 0.2.1.24 makes Tor work again on the latest OS X -- this time
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c
index 3441c30f90..0926dfb03e 100644
--- a/src/or/circuitbuild.c
+++ b/src/or/circuitbuild.c
@@ -137,11 +137,11 @@ circuit_list_path_impl(origin_circuit_t *circ, int verbose, int verbose_names)
const char *id;
if (!hop)
break;
- id = hop->extend_info->identity_digest;
if (!verbose && hop->state != CPATH_STATE_OPEN)
break;
if (!hop->extend_info)
break;
+ id = hop->extend_info->identity_digest;
if (verbose_names) {
elt = tor_malloc(MAX_VERBOSE_NICKNAME_LEN+1);
if ((ri = router_get_by_digest(id))) {