diff options
author | 2021-11-23 16:23:16 -0800 | |
---|---|---|
committer | 2021-11-26 00:15:02 +0100 | |
commit | 2a6a9bf26170b4e156c18706cd230934ebd2f95f (patch) | |
tree | b542fe70eedb6b9914aa75d2aa61373779a79a84 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | libbpf: Fix potential misaligned memory access in btf_ext__new() (diff) | |
download | wireguard-linux-2a6a9bf26170b4e156c18706cd230934ebd2f95f.tar.xz wireguard-linux-2a6a9bf26170b4e156c18706cd230934ebd2f95f.zip |
libbpf: Don't call libc APIs with NULL pointers
Sanitizer complains about qsort(), bsearch(), and memcpy() being called
with NULL pointer. This can only happen when the associated number of
elements is zero, so no harm should be done. But still prevent this from
happening to keep sanitizer runs clean from extra noise.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211124002325.1737739-5-andrii@kernel.org
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions