diff options
author | Neel Chauhan <neel@neelc.org> | 2017-09-19 16:08:24 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2018-11-30 12:16:18 -0500 |
commit | d18a167ff38799ea5cd846dd80acccab6404952a (patch) | |
tree | cc62e2ef88ef2c5460fc31f688e45a4b602c88d2 /src/feature/dirauth/shared_random.c | |
parent | 72c1303cef629576cb8d078590ed71091828fd78 (diff) | |
download | tor-d18a167ff38799ea5cd846dd80acccab6404952a.tar.gz tor-d18a167ff38799ea5cd846dd80acccab6404952a.zip |
sr: Switch from tor_assert() to BUG()
Closes #19566
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/feature/dirauth/shared_random.c')
-rw-r--r-- | src/feature/dirauth/shared_random.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/feature/dirauth/shared_random.c b/src/feature/dirauth/shared_random.c index db4f9d328c..b027d9e375 100644 --- a/src/feature/dirauth/shared_random.c +++ b/src/feature/dirauth/shared_random.c @@ -949,7 +949,8 @@ sr_compute_srv(void) /* Computing a shared random value in the commit phase is very wrong. This * should only happen at the very end of the reveal phase when a new * protocol run is about to start. */ - tor_assert(sr_state_get_phase() == SR_PHASE_REVEAL); + if (BUG(sr_state_get_phase() != SR_PHASE_REVEAL)) + return; state_commits = sr_state_get_commits(); commits = smartlist_new(); |