Fix: consumerd: strlen called on uninitialized path
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Apr 2021 23:54:47 +0000 (19:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 11 May 2021 15:22:06 +0000 (11:22 -0400)
closed_trace_chunk_path is uninitialized when relayd_id != 0.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I71564bdce0617de7749fc5848764a8cda4d122ea

src/common/ust-consumer/ust-consumer.c

index 69a07ec846b1b107da7882887c227279c4e7885c..f176ca40a380b9999703ae27f489076b2ec8f810 100644 (file)
@@ -2186,7 +2186,7 @@ end_rotate_channel_nosignal:
                const uint64_t relayd_id =
                                msg.u.close_trace_chunk.relayd_id.value;
                struct lttcomm_consumer_close_trace_chunk_reply reply;
-               char closed_trace_chunk_path[LTTNG_PATH_MAX];
+               char closed_trace_chunk_path[LTTNG_PATH_MAX] = {};
                int ret;
 
                ret_code = lttng_consumer_close_trace_chunk(
This page took 0.026986 seconds and 5 git commands to generate.