commit | de4b4b94fad90f876ab12e87999109e31a1871b4 | [log] [tgz] |
---|---|---|
author | Michael Mullin <masmullin@gmail.com> | Mon May 23 15:49:17 2022 -0400 |
committer | Andrii Nakryiko <andrii@kernel.org> | Thu Jun 02 16:26:43 2022 -0700 |
tree | 1b795412ac72bdd5858073682f4b274b6d93d629 | |
parent | eb7b36ce47f830a01ad9405e673b563cc3638d5d [diff] |
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: Michael Mullin <masmullin@gmail.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20220523194917.igkgorco42537arb@jup