This should extend the range of possible results.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/21429)
int err = 0;
uint64_t window_rem = rxfc->cwm - rxfc->rwm;
uint64_t threshold
- = safe_mul_uint64_t(rxfc->cur_window_size,
- WINDOW_THRESHOLD_NUM, &err) / WINDOW_THRESHOLD_DEN;
+ = safe_muldiv_uint64_t(rxfc->cur_window_size,
+ WINDOW_THRESHOLD_NUM, WINDOW_THRESHOLD_DEN, &err);
if (err)
/*