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 17:29:44 +0000 (13:29 -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 81c05d2da1febfe5fff215e9917195dd4b4d8ab4..ffbf907dae6b4dab21cbf467872766c61abc7947 100644 (file)
@@ -2177,7 +2177,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.026761 seconds and 4 git commands to generate.