Skip to content

Commit

Permalink
auth: Replace random() with proper i_rand_minmax()
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse committed Nov 27, 2024
1 parent 41b4d41 commit 98220b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/auth-request-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ void auth_request_handler_flush_failures(bool flush_all)
to figure out results based on the order of replies. */
count = i;
for (i = 0; i < count; i++) {
j = random() % (count - i) + i;
j = i_rand_minmax(i, count - 1);
auth_request = auth_requests[aqueue_idx(auth_failures, i)];

/* swap i & j */
Expand Down

0 comments on commit 98220b6

Please sign in to comment.