Commit fe53518245 for openssl.org
commit fe535182455ab0854ee30a215aef4428cb2d01d0
Author: Liu Dongmiao <473522+liudongmiao@users.noreply.github.com>
Date: Wed Nov 18 12:30:52 2026 +0800
quic: do not skip CRYPTO ranges after the first frame in a packet
txp_generate_crypto_frames() used the same counter to skip ranges of
pending CRYPTO data and to walk the iovecs of each frame. After the
first frame, the skip count was left at the number of iovecs, so later
ranges were passed over and sent in a following packet. Use a separate
counter for the iovecs.
Assisted-by: Claude:claude-opus-5-5
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Merge-date: Fri Dec 4 13:55:46 2026
Merged-from: https://github.com/openssl/openssl/pull/33782
diff --git a/ssl/quic/quic_txp.c b/ssl/quic/quic_txp.c
index ebba1cf070..a2491a7ee3 100644
--- a/ssl/quic/quic_txp.c
+++ b/ssl/quic/quic_txp.c
@@ -2156,7 +2156,7 @@ static int txp_generate_crypto_frames(OSSL_QUIC_TX_PACKETISER *txp,
uint64_t hdr_bytes;
WPACKET *wpkt;
QUIC_TXPIM_CHUNK chunk = { 0 };
- size_t i, space_left;
+ size_t i, j, space_left;
for (i = 0;; ++i) {
space_left = tx_helper_get_space_left(h);
@@ -2212,8 +2212,8 @@ static int txp_generate_crypto_frames(OSSL_QUIC_TX_PACKETISER *txp,
return 0; /* alloc error */
/* Add payload iovecs to the helper (infallible). */
- for (i = 0; i < num_stream_iovec; ++i)
- tx_helper_append_iovec(h, iov[i].buf, iov[i].buf_len);
+ for (j = 0; j < num_stream_iovec; ++j)
+ tx_helper_append_iovec(h, iov[j].buf, iov[j].buf_len);
*have_ack_eliciting = 1;
tx_helper_unrestrict(h); /* no longer need PING */