From 73b49e65fcb075d624db6bc637781b53408bd76f Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Fri, 31 Jan 2025 09:41:36 -0500 Subject: [PATCH] init token to ease cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Matt Caswell Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/26517) --- ssl/quic/quic_port.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ssl/quic/quic_port.c b/ssl/quic/quic_port.c index 6cc2c264467..a9ee31fbf9c 100644 --- a/ssl/quic/quic_port.c +++ b/ssl/quic/quic_port.c @@ -1088,6 +1088,8 @@ static void port_send_retry(QUIC_PORT *port, if (ok == 0) goto err; + memset(&token, 0, sizeof(QUIC_VALIDATION_TOKEN)); + /* Generate retry validation token */ if (!generate_token(peer, client_hdr->dst_conn_id, hdr.src_conn_id, &token, 1) @@ -1401,6 +1403,8 @@ static void generate_new_token(QUIC_CHANNEL *ch, BIO_ADDR *peer) return; } + memset(&token, 0, sizeof(QUIC_VALIDATION_TOKEN)); + if (!generate_token(peer, ch->init_dcid, rscid, &token, 0) || !marshal_validation_token(&token, buffer, &token_buf_len) || !encrypt_validation_token(ch->port, buffer, token_buf_len, NULL, -- 2.47.2