From: Jérémie Galarneau Date: Thu, 22 Apr 2021 23:54:47 +0000 (-0400) Subject: Fix: consumerd: strlen called on uninitialized path X-Git-Tag: v2.12.4~10 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fe009695f184bc5cc1cf04c98081a940a2f78b7a;p=lttng-tools.git Fix: consumerd: strlen called on uninitialized path closed_trace_chunk_path is uninitialized when relayd_id != 0. Signed-off-by: Jérémie Galarneau Change-Id: I71564bdce0617de7749fc5848764a8cda4d122ea --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 69a07ec84..f176ca40a 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -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(