summaryrefslogtreecommitdiffstats
path: root/ssl/quic/quic_fc.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2023-07-17 11:06:35 +1000
committerPauli <pauli@openssl.org>2023-08-04 11:55:34 +1000
commit24ae2d79d57dd60f2617502d751d0ef78c571307 (patch)
tree5bfa00b3b3d8ec1cb3e87eafe421d40f2a7ebee4 /ssl/quic/quic_fc.c
parenta441d08b1b10f259c8fa9eb9cd836ffe19b23b0f (diff)
quic: use the safe fused multiply divide instead of a safe multiply then 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 https://github.com/openssl/openssl/pull/21429)
Diffstat (limited to 'ssl/quic/quic_fc.c')
-rw-r--r--ssl/quic/quic_fc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssl/quic/quic_fc.c b/ssl/quic/quic_fc.c
index 25a10b4ebe..caf69a1d67 100644
--- a/ssl/quic/quic_fc.c
+++ b/ssl/quic/quic_fc.c
@@ -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)
/*