]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Proper NULL checking in circuit_list_path_impl()
authorSebastian Hahn <sebastian@torproject.org>
Wed, 24 Feb 2010 08:36:15 +0000 (09:36 +0100)
committerSebastian Hahn <sebastian@torproject.org>
Fri, 26 Feb 2010 04:53:26 +0000 (05:53 +0100)
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.

ChangeLog
src/or/circuitbuild.c

index 525a00b37846fcb623022d38b75ec1892c8312f4..8ec64c053838ec325e8d54e7d796e1b020c5b297 100644 (file)
--- 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
index 3441c30f907b78276b57eccf4eec6fea525626bb..0926dfb03e49bbd335fbfee3d8ccfc161d6d5a3f 100644 (file)
@@ -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))) {