diff options
author | Shung-Hsi Yu <shung-hsi.yu@suse.com> | 2022-10-12 10:23:52 +0800 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2022-10-13 10:53:34 -0700 |
commit | 35a855509e6ee3442477c8ebc6827b5b5d32a7b5 (patch) | |
tree | 0008da47b5d124d2ae4f7a6fca5bd01c9dcc0af2 /tools/testing/selftests/bpf/prog_tests/bpf_iter.c | |
parent | 51deedc9b8680953437dfe359e5268120de10e30 (diff) |
libbpf: Deal with section with no data gracefully
ELF section data pointer returned by libelf may be NULL (if section has
SHT_NOBITS), so null check section data pointer before attempting to
copy license and kversion section.
Fixes: cb1e5e961991 ("bpf tools: Collect version and license from ELF sections")
Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20221012022353.7350-3-shung-hsi.yu@suse.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/bpf_iter.c')
0 files changed, 0 insertions, 0 deletions