diff options
author | Hugo Landau <hlandau@openssl.org> | 2023-03-02 16:05:36 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2023-05-01 11:03:54 +0100 |
commit | 0f1c43c441acd23ba2c14c93f9ce059348a617b0 (patch) | |
tree | 041491d91609a0e3c84b8ea52cd96025df1c764a | |
parent | f6f45c55ea0f597387005c429beba80d76484389 (diff) | |
download | openssl-new-0f1c43c441acd23ba2c14c93f9ce059348a617b0.tar.gz |
QUIC CC: Minor fixes
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20423)
-rw-r--r-- | ssl/quic/quic_ackm.c | 3 | ||||
-rw-r--r-- | test/quic_cc_test.c | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/ssl/quic/quic_ackm.c b/ssl/quic/quic_ackm.c index b798636571..f7986728f6 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 e3e5e87d38..3eef4d64a2 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; |