Skip to content

Commit

Permalink
quic: use the safe fused multiply divide instead of a safe multiply t…
Browse files Browse the repository at this point in the history
…hen a normal division

This should extend the range of possible results.

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #21429)
  • Loading branch information
paulidale committed Aug 4, 2023
1 parent a441d08 commit 24ae2d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl/quic/quic_fc.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ static int rxfc_cwm_bump_desired(QUIC_RXFC *rxfc)
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)
/*
Expand Down

0 comments on commit 24ae2d7

Please sign in to comment.