mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +00:00
LibELF: Prevent negative index when determining dynamic symbol count
This commit is contained in:
@@ -242,6 +242,11 @@ void DynamicObject::parse()
|
||||
}
|
||||
}
|
||||
|
||||
if (highest_chain_idx < num_omitted_symbols) {
|
||||
m_symbol_count = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
size_t amount_symbols = highest_chain_idx;
|
||||
u32 const* last_chain = &chains[highest_chain_idx - num_omitted_symbols];
|
||||
while ((*(last_chain++) & 1) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user