mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-22 14:23:04 +01:00
Resolve a division-by-zero complaint from coverity. CID 1397272
This commit is contained in:
parent
2a00110e5b
commit
23c09b6bc2
1 changed files with 2 additions and 1 deletions
|
@ -638,7 +638,8 @@ choose_guard_selection(const or_options_t *options,
|
|||
*/
|
||||
|
||||
static int have_warned_extreme_threshold = 0;
|
||||
if (n_passing_filter < extreme_threshold &&
|
||||
if (n_guards &&
|
||||
n_passing_filter < extreme_threshold &&
|
||||
! have_warned_extreme_threshold) {
|
||||
have_warned_extreme_threshold = 1;
|
||||
const double exclude_frac =
|
||||
|
|
Loading…
Add table
Reference in a new issue