Skip to content
Commit 7620bffb authored by Xin Liu's avatar Xin Liu Committed by Andrii Nakryiko
Browse files

libbpf: Fix NULL pointer exception in API btf_dump__dump_type_data



We found that function btf_dump__dump_type_data can be called by the
user as an API, but in this function, the `opts` parameter may be used
as a null pointer.This causes `opts->indent_str` to trigger a NULL
pointer exception.

Fixes: 2ce8450e ("libbpf: add bpf_object__open_{file, mem} w/ extensible opts")
Signed-off-by: default avatarXin Liu <liuxin350@huawei.com>
Signed-off-by: default avatarWeibin Kong <kongweibin2@huawei.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220917084809.30770-1-liuxin350@huawei.com
parent bc069da6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment