mirror of https://github.com/aya-rs/aya
aya: Ensure that truncated map names are NUL terminated
Limit of map names in eBPF is 16 bytes and they have to be NUL terminated. Before this change, long names were truncated to 16 bytes. `MAP_WITH_LOOOONG_NAAAAAAAAME` would become `MAP_WITH_LOOOONG`, which doesn't contain the NUL byte. This change fixes that by truncating the name to 15 bytes, ensuring that the 16th byte is NUL. `MAP_WITH_LOOOONG_NAAAAAAAAME` is truncated to `MAP_WITH_LOOOON\0`.reviewable/pr1216/r2
parent
dcf66db845
commit
4eece1c0ce
Loading…
Reference in New Issue