]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
relay: Zeroed a stack allocated relay msg struct
authorDavid Goulet <dgoulet@torproject.org>
Mon, 15 Sep 2025 17:04:54 +0000 (13:04 -0400)
committerDavid Goulet <dgoulet@torproject.org>
Mon, 15 Sep 2025 17:04:54 +0000 (13:04 -0400)
Following 63332eb3e711786f (MR 926), just more defense in depth for our future
selves.

Related to #41123

Signed-off-by: David Goulet <dgoulet@torproject.org>
src/core/or/relay.c

index e03425bae5e1f661c7d2a2086260d5da4bda1ac0..69173ad485da7e426e6fd73878f2565347a89e07 100644 (file)
@@ -609,7 +609,7 @@ relay_send_command_from_edge_,(streamid_t stream_id, circuit_t *orig_circ,
   size_t msg_body_len;
   {
     relay_cell_fmt_t cell_format = circuit_get_relay_format(circ, cpath_layer);
-    relay_msg_t msg;
+    relay_msg_t msg = {0};
     if (payload_len >
         relay_cell_max_payload_size(cell_format, relay_command)) {
       // TODO CGO: Rate-limit this?