aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug82084
-rw-r--r--src/or/router.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/changes/bug8208 b/changes/bug8208
new file mode 100644
index 0000000000..c85db90b52
--- /dev/null
+++ b/changes/bug8208
@@ -0,0 +1,4 @@
+ o Minor bugfixes:
+ - Avoid a crash if we fail to generate an extrinfo descriptor.
+ Fixes bug 8208; bugfix on 0.2.3.16-alpha. Found by Coverity;
+ this is CID 718634.
diff --git a/src/or/router.c b/src/or/router.c
index f336f128d2..899246f85e 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -1942,9 +1942,13 @@ router_rebuild_descriptor(int force)
anyway, since they don't have a DirPort, and always connect to the
bridge authority anonymously. But just in case they somehow think of
sending them on an unencrypted connection, don't allow them to try. */
- ri->cache_info.send_unencrypted = ei->cache_info.send_unencrypted = 0;
+ ri->cache_info.send_unencrypted = 0;
+ if (ei)
+ ei->cache_info.send_unencrypted = 0
} else {
- ri->cache_info.send_unencrypted = ei->cache_info.send_unencrypted = 1;
+ ri->cache_info.send_unencrypted = 1;
+ if (ei)
+ ei->cache_info.send_unencrypted = 1;
}
router_get_router_hash(ri->cache_info.signed_descriptor_body,