summaryrefslogtreecommitdiff
path: root/lib/radix-tree.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2018-04-25 15:08:53 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-06-21 04:02:49 +0900
commit40d526e672125a75342b779a9305b64f8792e1b0 (patch)
treeec5870f21fea84ff502d1db92dea2ad2de182547 /lib/radix-tree.c
parent09daf2df8db88672ae8060eee7802d93a371f244 (diff)
bpf: fix uninitialized variable in bpf tools
[ Upstream commit 815425567dea6c54494e85050631d6bdda907c5d ] 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> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/radix-tree.c')
0 files changed, 0 insertions, 0 deletions