mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:14:58 +00:00
LibELF: Prevent negative index when determining dynamic symbol count
This commit is contained in:
parent
a90e876667
commit
c87e1084b6
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
size_t amount_symbols = highest_chain_idx;
|
||||||
u32 const* last_chain = &chains[highest_chain_idx - num_omitted_symbols];
|
u32 const* last_chain = &chains[highest_chain_idx - num_omitted_symbols];
|
||||||
while ((*(last_chain++) & 1) == 0) {
|
while ((*(last_chain++) & 1) == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue