]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
init token to ease cleanup
authorNeil Horman <nhorman@openssl.org>
Fri, 31 Jan 2025 14:41:36 +0000 (09:41 -0500)
committerNeil Horman <nhorman@openssl.org>
Mon, 17 Feb 2025 16:27:33 +0000 (11:27 -0500)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26517)

ssl/quic/quic_port.c

index 6cc2c264467fefa9b4e4a31c0cf668a99e8e8235..a9ee31fbf9c2f3cf53e41f25f9ecde55b443f8a5 100644 (file)
@@ -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,