mirror of https://github.com/aya-rs/aya
aya: Ensure that truncated map names are NULL terminated
Limit of map names in eBPF is 16 bytes and they have to be NULL 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 NULL byte. This change fixes that by truncating the name to 15 bytes, ensuring that the 16th byte is NULL. `MAP_WITH_LOOOONG_NAAAAAAAAME` is truncated to `MAP_WITH_LOOOON\0`.reviewable/pr1217/r1
parent
dcf66db845
commit
f48b5a4a84
Loading…
Reference in New Issue