From 86828e2004058d01fba09215a44d51d53f82e5c3 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Wed, 24 Feb 2010 09:36:15 +0100 Subject: 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. --- src/or/circuitbuild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index 3441c30f9..0926dfb03 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))) { -- cgit v1.2.3