From: Hugo Landau Date: Thu, 2 Mar 2023 16:05:36 +0000 (+0000) Subject: QUIC CC: Minor fixes X-Git-Tag: openssl-3.2.0-alpha1~933 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0f1c43c441acd23ba2c14c93f9ce059348a617b0;p=thirdparty%2Fopenssl.git QUIC CC: Minor fixes Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/20423) --- diff --git a/ssl/quic/quic_ackm.c b/ssl/quic/quic_ackm.c index b7986365719..f7986728f6c 100644 --- a/ssl/quic/quic_ackm.c +++ b/ssl/quic/quic_ackm.c @@ -921,7 +921,6 @@ static void ackm_on_pkts_lost(OSSL_ACKM *ackm, int pkt_space, const OSSL_ACKM_TX_PKT *p, *pnext; OSSL_RTT_INFO rtt; QUIC_PN largest_pn_lost = 0; - uint64_t num_bytes = 0; OSSL_CC_LOSS_INFO loss_info = {0}; uint32_t flags = 0; @@ -936,8 +935,6 @@ static void ackm_on_pkts_lost(OSSL_ACKM *ackm, int pkt_space, if (p->pkt_num > largest_pn_lost) largest_pn_lost = p->pkt_num; - - num_bytes += p->num_bytes; } if (!pseudo) { diff --git a/test/quic_cc_test.c b/test/quic_cc_test.c index e3e5e87d383..3eef4d64a20 100644 --- a/test/quic_cc_test.c +++ b/test/quic_cc_test.c @@ -371,6 +371,8 @@ static int test_simulate(void) allowance = ccm->get_tx_allowance(cc); sz = allowance > mdpl ? mdpl : allowance; + if (sz > SIZE_MAX) + sz = SIZE_MAX; /* * QUIC minimum packet sizes, etc. mean that in practice we will not @@ -381,7 +383,7 @@ static int test_simulate(void) step_time(7); - if (!TEST_true(net_sim_send(&sim, sz))) + if (!TEST_true(net_sim_send(&sim, (size_t)sz))) goto err; total_sent += sz;