aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <[email protected]>2021-11-03 10:32:12 -0700
committerAlexei Starovoitov <[email protected]>2021-11-03 13:25:37 -0700
commit0d6988e16a12ebd41d3e268992211b0ceba44ed7 (patch)
treecbaba4bdd1ac6b5bd37756f205ac58b5eccf3280 /lib/test_overflow.c
parent62554d52e71797eefa3fc15b54008038837bb2d4 (diff)
libbpf: Fix section counting logic
e_shnum does include section #0 and as such is exactly the number of ELF sections that we need to allocate memory for to use section indices as array indices. Fix the off-by-one error. This is purely accounting fix, previously we were overallocating one too many array items. But no correctness errors otherwise. Fixes: 25bbbd7a444b ("libbpf: Remove assumptions about uniqueness of .rodata/.data/.bss maps") Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions