浏览代码

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 12 年之前
父节点
当前提交
5ffa7102c0
共有 1 个文件被更改,包括 2 次插入1 次删除
  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;