From: Neil Horman Date: Fri, 31 Jan 2025 14:41:36 +0000 (-0500) Subject: init token to ease cleanup X-Git-Tag: openssl-3.5.0-alpha1~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73b49e65fcb075d624db6bc637781b53408bd76f;p=thirdparty%2Fopenssl.git init token to ease cleanup Reviewed-by: Matt Caswell Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/26517) --- 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,