]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Don't segfault when checking whether a not-yet-used intro point should expire
authorRobert Ransom <rransom.8774@gmail.com>
Thu, 1 Dec 2011 23:26:45 +0000 (15:26 -0800)
committerRobert Ransom <rransom.8774@gmail.com>
Thu, 1 Dec 2011 23:26:45 +0000 (15:26 -0800)
Found by katmagic.  Bugfix on the #3460 branch, not yet in any release.

src/or/rendservice.c

index a360d5ce58f2cc54c50800e64774c05cda271357..177f3bf23c09318cca458276b64081bff61e1696 100644 (file)
@@ -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;