propertly initialize pe_section_name_counter (#2452)
properly initialize the pe_section_name_counter bpf2c crashes in set_pe_section_name during call to strncpy_s when provided invalid prefix_length as count due tointeger underflow. the root cause is pe_section_name_counter is not appropriately initialized to 0
This commit is contained in:
Родитель
b9cf492a36
Коммит
e1b8ed8ea0
|
@ -397,7 +397,7 @@ class bpf_code_generator
|
||||||
bool
|
bool
|
||||||
is_section_valid(const ELFIO::section* section);
|
is_section_valid(const ELFIO::section* section);
|
||||||
|
|
||||||
int pe_section_name_counter;
|
int pe_section_name_counter{};
|
||||||
std::map<unsafe_string, section_t> sections;
|
std::map<unsafe_string, section_t> sections;
|
||||||
section_t* current_section;
|
section_t* current_section;
|
||||||
ELFIO::elfio reader;
|
ELFIO::elfio reader;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче