changeset 8933:02a9ad88e2df quic

QUIC: added missing frame initialization. Currently, all used fields are initialized, but usage may change in future.
author Vladimir Homutov <vl@nginx.com>
date Mon, 06 Dec 2021 11:04:55 +0300
parents 501f28679d56
children 9ec96ceaf484
files src/event/quic/ngx_event_quic_migration.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/event/quic/ngx_event_quic_migration.c
+++ b/src/event/quic/ngx_event_quic_migration.c
@@ -31,6 +31,8 @@ ngx_quic_handle_path_challenge_frame(ngx
 
     qc = ngx_quic_get_connection(c);
 
+    ngx_memzero(&frame, sizeof(ngx_quic_frame_t));
+
     frame.level = ssl_encryption_application;
     frame.type = NGX_QUIC_FT_PATH_RESPONSE;
     frame.u.path_response = *f;
@@ -524,6 +526,8 @@ ngx_quic_send_path_challenge(ngx_connect
                    "quic path #%uL send path challenge tries:%ui",
                    path->seqnum, path->tries);
 
+    ngx_memzero(&frame, sizeof(ngx_quic_frame_t));
+
     frame.level = ssl_encryption_application;
     frame.type = NGX_QUIC_FT_PATH_CHALLENGE;