diff options
author | Quentin Monnet <quentin.monnet@netronome.com> | 2019-08-15 15:32:17 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-08-15 22:06:46 -0700 |
commit | ed4a3983cd3eb93aaf80de8d8a36efed808acff2 (patch) | |
tree | e237f47c2c63e900178a4d48d3549dec0bc1f6dd /tools/bpf | |
parent | 22c349e8db89df86804d3ba23cef037ccd44a8bf (diff) | |
download | linux-ed4a3983cd3eb93aaf80de8d8a36efed808acff2.tar.gz linux-ed4a3983cd3eb93aaf80de8d8a36efed808acff2.tar.bz2 linux-ed4a3983cd3eb93aaf80de8d8a36efed808acff2.zip |
tools: bpftool: fix argument for p_err() in BTF do_dump()
The last argument passed to one call to the p_err() function is not
correct, it should be "*argv" instead of "**argv". This may lead to a
segmentation fault error if BTF id cannot be parsed correctly. Let's fix
this.
Fixes: c93cc69004dt ("bpftool: add ability to dump BTF types")
Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/btf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/btf.c b/tools/bpf/bpftool/btf.c index 1b8ec91899e6..8805637f1a7e 100644 --- a/tools/bpf/bpftool/btf.c +++ b/tools/bpf/bpftool/btf.c @@ -449,7 +449,7 @@ static int do_dump(int argc, char **argv) btf_id = strtoul(*argv, &endptr, 0); if (*endptr) { - p_err("can't parse %s as ID", **argv); + p_err("can't parse %s as ID", *argv); return -1; } NEXT_ARG(); |