summaryrefslogtreecommitdiff
path: root/src/or/router.c
diff options
context:
space:
mode:
authorRobert Ransom <rransom.8774@gmail.com>2010-11-24 07:50:29 -0800
committerRobert Ransom <rransom.8774@gmail.com>2010-11-24 13:18:11 -0800
commitde75afc5561fe931d1ff4d29ae629a92205154f0 (patch)
treed825f17de20853770ac00a3ff4dfa03d2cb015d1 /src/or/router.c
parent713db8dbfa172ea395ff3cee33fea875a052bd35 (diff)
downloadtor-de75afc5561fe931d1ff4d29ae629a92205154f0.tar.gz
tor-de75afc5561fe931d1ff4d29ae629a92205154f0.zip
Avoid dereferencing NULL if a bridge fails to build an ei descriptor.
Reported by an anonymous commenter on Trac.
Diffstat (limited to 'src/or/router.c')
-rw-r--r--src/or/router.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 3d4ee70399..66ef8ec52e 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1523,7 +1523,7 @@ router_rebuild_descriptor(int force)
/* Let bridges serve their own descriptors unencrypted, so they can
* pass reachability testing. (If they want to be harder to notice,
* they can always leave the DirPort off). */
- if (!options->BridgeRelay)
+ if (ei && !options->BridgeRelay)
ei->cache_info.send_unencrypted = 1;
router_get_router_hash(ri->cache_info.signed_descriptor_body,