All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: John Fastabend <john.fastabend@gmail.com>,
	ast@kernel.org, jbenc@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: [bpf PATCH] bpf: fix uninitialized variable in bpf tools
Date: Thu, 26 Apr 2018 22:55:54 +0200	[thread overview]
Message-ID: <66dea869-f3e3-355d-928a-8894e672b914@iogearbox.net> (raw)
In-Reply-To: <20180425220852.10403.79675.stgit@john-Precision-Tower-5810>

On 04/26/2018 12:08 AM, John Fastabend wrote:
> Here the variable cont is used as the saved_pointer for a call to
> strtok_r(). It is safe to use the value uninitialized in this
> context however and the later reference is only ever used if
> the strtok_r is successful. But, 'gcc-5' at least doesn't have all
> this knowledge so initialize cont to NULL. Additionally, do the
> natural NULL check before accessing just for completness.
> 
> The warning is the following:
> 
> ./bpf/tools/bpf/bpf_dbg.c: In function ‘cmd_load’:
> ./bpf/tools/bpf/bpf_dbg.c:1077:13: warning: ‘cont’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>   } else if (matches(subcmd, "pcap") == 0) {
> 
> Fixes: fd981e3c321a "filter: bpf_dbg: add minimal bpf debugger"
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>

Applied to bpf tree, thanks John!

      reply	other threads:[~2018-04-26 20:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-25 22:08 [bpf PATCH] bpf: fix uninitialized variable in bpf tools John Fastabend
2018-04-26 20:55 ` Daniel Borkmann [this message]

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=66dea869-f3e3-355d-928a-8894e672b914@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@kernel.org \
    --cc=jbenc@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.