diff options
author | Sebastian Hahn <sebastian@torproject.org> | 2015-03-12 18:59:46 +0100 |
---|---|---|
committer | Sebastian Hahn <sebastian@torproject.org> | 2015-03-12 18:59:46 +0100 |
commit | badc81de5bc60c5f53b3c1dd3cf9b1a819ff89c4 (patch) | |
tree | ff762cf8bb5b801dd6ce3ac633fa3040951e1430 | |
parent | 447769dd283f642f6a84a27a10ac1f3c36ad4900 (diff) | |
download | tor-badc81de5bc60c5f53b3c1dd3cf9b1a819ff89c4.tar.gz tor-badc81de5bc60c5f53b3c1dd3cf9b1a819ff89c4.zip |
Don't init hs intro key as side effect of an assert
-rw-r--r-- | changes/bug15211 | 3 | ||||
-rw-r--r-- | src/or/rendservice.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/changes/bug15211 b/changes/bug15211 index b14f5cb6f0..24c189dbfd 100644 --- a/changes/bug15211 +++ b/changes/bug15211 @@ -1,5 +1,6 @@ o Minor bugfixes: - Remove side-effects from tor_assert() calls. This was harmless, because we never disable assertions, but it is bad style and - unnecessary. Fixes bug 15211; bugfix on 0.2.5.5, 0.2.2.36. + unnecessary. Fixes bug 15211; bugfix on 0.2.5.5, 0.2.2.36, and + 0.2.0.10. diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 036869650c..77eaea0ed9 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -3320,7 +3320,8 @@ rend_services_introduce(void) intro = tor_malloc_zero(sizeof(rend_intro_point_t)); intro->extend_info = extend_info_from_node(node, 0); intro->intro_key = crypto_pk_new(); - tor_assert(!crypto_pk_generate_key(intro->intro_key)); + int fail = crypto_pk_generate_key(intro->intro_key); + tor_assert(!fail); intro->time_published = -1; intro->time_to_expire = -1; intro->time_expiring = -1; |