mirror of
https://github.com/avast/retdec.git
synced 2024-11-23 21:10:13 +00:00
unpackertool/upx/elf: fix #904, prevent possible infinite loop
This commit is contained in:
parent
06750aa0e4
commit
72a3e9a961
@ -385,7 +385,7 @@ template <int bits> std::uint32_t ElfUpxStub<bits>::getFirstBlockOffset()
|
||||
itr != end;
|
||||
++itr)
|
||||
{
|
||||
if (baseOffset == (*itr)->getOffset())
|
||||
if (baseOffset == (*itr)->getOffset() && (*itr)->getSizeInFile() > 0)
|
||||
{
|
||||
baseOffset += (*itr)->getSizeInFile();
|
||||
// Reset back to the beginning, we need to find whether there are
|
||||
|
Loading…
Reference in New Issue
Block a user