Skip to content

Commit 35a60be

Browse files
rbranWeitao-Sun
authored andcommitted
add loop guard to PEView::Init
1 parent 99059c4 commit 35a60be

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

view/pe/peview.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1522,7 +1522,8 @@ bool PEView::Init()
15221522
size_t numImportEntries = 0;
15231523
vector<Ref<Metadata>> libraries;
15241524
vector<Ref<Metadata>> libraryFound;
1525-
while (true)
1525+
uint32_t guard_1 = 0;
1526+
while (guard_1++ < 0x100)
15261527
{
15271528
// Read in next directory entry
15281529
reader.Seek(RVAToFileOffset(dir.virtualAddress + (numImportEntries * 20)));
@@ -1614,7 +1615,8 @@ bool PEView::Init()
16141615
// We should make this second unused data a structure containing this information information
16151616
// and default it to collapsed...IDA Just doesn't show anything at all
16161617
m_logger->LogDebug("Name: %s\n", dllName.c_str());
1617-
while (true)
1618+
uint32_t guard_2 = 0;
1619+
while (guard_2++ < 0x1000)
16181620
{
16191621
uint64_t entry;
16201622
bool isOrdinal;

0 commit comments

Comments
 (0)