[tor-commits] [tor/master] Don't segfault when checking whether a not-yet-used intro point should expire

nickm at torproject.org nickm at torproject.org
Fri Dec 2 05:20:44 UTC 2011


commit 5ffa7102c00385445d3855bbc481668edf62d139
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Thu Dec 1 15:26:45 2011 -0800

    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.
---
 src/or/rendservice.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/or/rendservice.c b/src/or/rendservice.c
index a360d5c..177f3bf 100644
--- a/src/or/rendservice.c
+++ b/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;



More information about the tor-commits mailing list