From: Pauli Date: Mon, 17 Jul 2023 01:06:35 +0000 (+1000) Subject: quic: use the safe fused multiply divide instead of a safe multiply then a normal... X-Git-Tag: openssl-3.2.0-alpha1~314 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24ae2d79d57dd60f2617502d751d0ef78c571307;p=thirdparty%2Fopenssl.git 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 Reviewed-by: Hugo Landau (Merged from https://github.com/openssl/openssl/pull/21429) --- diff --git a/ssl/quic/quic_fc.c b/ssl/quic/quic_fc.c index 25a10b4ebe7..caf69a1d67f 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) /*