diff options
author | Shung-Hsi Yu <[email protected]> | 2022-10-12 10:23:52 +0800 |
---|---|---|
committer | Andrii Nakryiko <[email protected]> | 2022-10-13 10:53:34 -0700 |
commit | 35a855509e6ee3442477c8ebc6827b5b5d32a7b5 (patch) | |
tree | 0008da47b5d124d2ae4f7a6fca5bd01c9dcc0af2 /tools/testing/selftests/bpf/prog_tests/prog_array_init.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 <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions