Open
Description
uint8_t* entry = &map->data[*key * map->ebpf_map_definition.value_size]; is incorrect. *key is a pointer to uint8_t, not an integer index. It should be (uint32_t)key to match the pattern used elsewhere for array index calculation.
Suggested change:
-
uint8_t* entry = &map->data[*key * map->ebpf_map_definition.value_size];
-
uint8_t* entry = &map->data[*(uint32_t*)key * map->ebpf_map_definition.value_size];