diff --git a/src/quic_conn.c b/src/quic_conn.c index a110e9c23..832886260 100644 --- a/src/quic_conn.c +++ b/src/quic_conn.c @@ -2052,6 +2052,11 @@ static inline void qc_release_lost_pkts(struct quic_conn *qc, qc->path->cc.algo->slow_start(&qc->path->cc); } + /* cannot be NULL at this stage because we have ensured + * that list is not empty. Without this, GCC 12.2.0 reports a + * possible overflow on a 0 byte region with O2 optimization. + */ + ALREADY_CHECKED(oldest_lost); quic_tx_packet_refdec(oldest_lost); if (newest_lost != oldest_lost) quic_tx_packet_refdec(newest_lost);