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>
Fri, 23 Apr 2021 03:57:53 +0000 (23:57 -0400)
closed_trace_chunk_path is uninitialized when relayd_id != 0.

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

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

index c4ee7446d05ba2bf24439fd9d34c1ad1c5395740..bdfb8a0bbd3b75a939135c127e8e51c0fe6ab66e 100644 (file)
@@ -2190,7 +2190,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.027577 seconds and 4 git commands to generate.