Selaa lähdekoodia

Fix a crash bug when testing reachability

Fixes bug 25415; bugfix on 0.3.3.2-alpha.
Nick Mathewson 6 vuotta sitten
vanhempi
commit
3d12663243
2 muutettua tiedostoa jossa 6 lisäystä ja 1 poistoa
  1. 4 0
      changes/bug25415
  2. 2 1
      src/or/dirserv.c

+ 4 - 0
changes/bug25415

@@ -0,0 +1,4 @@
+  o Major bugfixes (directory authority):
+    - Avoid a crash when testing router reachability on a router that could
+      have an ed25519 ID, but which does not. Fixes bug 25415; bugfix on
+      0.3.3.2-alpha.

+ 2 - 1
src/or/dirserv.c

@@ -3402,7 +3402,8 @@ dirserv_single_reachability_test(time_t now, routerinfo_t *router)
   tor_assert(node);
 
   if (options->AuthDirTestEd25519LinkKeys &&
-      node_supports_ed25519_link_authentication(node, 1)) {
+      node_supports_ed25519_link_authentication(node, 1) &&
+      router->cache_info.signing_key_cert) {
     ed_id_key = &router->cache_info.signing_key_cert->signing_key;
   } else {
     ed_id_key = NULL;