From: jeremie.galarneau@efficios.com (Jérémie Galarneau)
Subject: [lttng-dev] [PATCH lttng-tools] Fix: initialize the cur_event variable before using it
Date: Wed, 18 May 2016 15:22:30 -0400 [thread overview]
Message-ID: <CA+jJMxvw1j+ky=RAxBQHU9r+ZrEoWnUA6BSht17HStqer-54SQ@mail.gmail.com> (raw)
In-Reply-To: <1463500367-23547-1-git-send-email-jonathan.rajotte-julien@efficios.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]
Merged, thanks!
Jérémie
On Tue, May 17, 2016 at 11:52 AM, Jonathan Rajotte
<jonathan.rajotte-julien at efficios.com> wrote:
> CID 1243041 (#1 of 1): Uninitialized scalar variable (UNINIT)
> uninit_use_in_call: Using uninitialized element of array *cur_event.name when
> calling strcmp.
>
> Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien at efficios.com>
> ---
> src/bin/lttng/commands/list.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c
> index 0dd74e5..418fccf 100644
> --- a/src/bin/lttng/commands/list.c
> +++ b/src/bin/lttng/commands/list.c
> @@ -621,6 +621,8 @@ static int mi_list_ust_event_fields(struct lttng_event_field *fields, int count,
> int event_element_open = 0;
> struct lttng_event cur_event;
>
> + memset(&cur_event, 0, sizeof(cur_event));
> +
> /* Open domains element */
> ret = mi_lttng_domains_open(writer);
> if (ret) {
> --
> 2.7.4
>
--
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
parent reply other threads:[~2016-05-18 19:22 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1463500367-23547-1-git-send-email-jonathan.rajotte-julien@efficios.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+jJMxvw1j+ky=RAxBQHU9r+ZrEoWnUA6BSht17HStqer-54SQ@mail.gmail.com' \
--to=jeremie.galarneau@efficios.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox