Skip to content
Commit de4b4b94 authored by Michael Mullin's avatar Michael Mullin Committed by Andrii Nakryiko
Browse files

bpftool: Check for NULL ptr of btf in codegen_asserts



bpf_object__btf() can return a NULL value.  If bpf_object__btf returns
null, do not progress through codegen_asserts(). This avoids a null ptr
dereference at the call btf__type_cnt() in the function find_type_for_map()

Signed-off-by: default avatarMichael Mullin <masmullin@gmail.com>
Signed-off-by: default avatarAndrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220523194917.igkgorco42537arb@jup
parent eb7b36ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment