From c1e4642cd27bd5b70c0eca1011d9e452bd24f018 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Fri, 5 May 2017 16:07:43 -0400 Subject: [PATCH 1/1] Fix: use of uninitialized channel attributes in client MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The channel attributes used to retrieve the defaults to use are not zero-initialized which is a problem now that the extended pointer is used to determine whether or not the structure was allocated on stack by the user (for backward compatibility) or dynamically using the new lttng_channel_create() interface. Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/enable_channels.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c index 950cdb67e..22331cec2 100644 --- a/src/bin/lttng/commands/enable_channels.c +++ b/src/bin/lttng/commands/enable_channels.c @@ -108,6 +108,8 @@ static void set_default_attr(struct lttng_domain *dom) { struct lttng_channel_attr default_attr; + memset(&default_attr, 0, sizeof(default_attr)); + /* Set attributes */ lttng_channel_set_default_attr(dom, &default_attr); -- 2.34.1