Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed4a3983 authored by Quentin Monnet's avatar Quentin Monnet Committed by Alexei Starovoitov
Browse files

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: default avatarQuentin Monnet <quentin.monnet@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 22c349e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();