diff options
author | Robert Ransom <rransom.8774@gmail.com> | 2011-12-01 15:26:45 -0800 |
---|---|---|
committer | Robert Ransom <rransom.8774@gmail.com> | 2011-12-01 15:26:45 -0800 |
commit | 5ffa7102c00385445d3855bbc481668edf62d139 (patch) | |
tree | 5b4e53f7e1af3c7b068e213a064776d246d4b2cb /src/or/rendservice.c | |
parent | c06c80b7f7911b0d5c99860ef8c4770cacdbe0a2 (diff) | |
download | tor-5ffa7102c00385445d3855bbc481668edf62d139.tar.gz tor-5ffa7102c00385445d3855bbc481668edf62d139.zip |
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.
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | 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 a360d5ce58..177f3bf23c 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; |