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.
This commit is contained in:
Robert Ransom 2011-12-01 15:26:45 -08:00
parent c06c80b7f7
commit 5ffa7102c0

View File

@ -1957,7 +1957,8 @@ intro_point_should_expire_now(rend_intro_point_t *intro,
return 1; 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) { INTRO_POINT_LIFETIME_INTRODUCTIONS) {
/* This intro point has been used too many times. Expire it now. */ /* This intro point has been used too many times. Expire it now. */
return 1; return 1;