Explorar el Código

Don't segfault when checking whether a not-yet-used intro point should expire

Found by katmagic.  Bugfix on the #3460 branch, not yet in any release.
Robert Ransom hace 14 años
padre
commit
5ffa7102c0
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/or/rendservice.c

+ 2 - 1
src/or/rendservice.c

@@ -1957,7 +1957,8 @@ intro_point_should_expire_now(rend_intro_point_t *intro,
     return 1;
   }
 
-  if (digestmap_size(intro->accepted_intro_rsa_parts) >=
+  if (intro->accepted_intro_rsa_parts != NULL &&
+      digestmap_size(intro->accepted_intro_rsa_parts) >=
       INTRO_POINT_LIFETIME_INTRODUCTIONS) {
     /* This intro point has been used too many times.  Expire it now. */
     return 1;