Fix infinite loop in traversing thunk chunks when checking if thunks are installed...
authorJeremy Koritzinsky <jekoritz@microsoft.com>
Wed, 19 Jun 2019 20:04:22 +0000 (13:04 -0700)
committerGitHub <noreply@github.com>
Wed, 19 Jun 2019 20:04:22 +0000 (13:04 -0700)
Commit migrated from https://github.com/dotnet/core-setup/commit/82a394219d72114fbeae35dcc6166e79e341d21c

src/installer/corehost/cli/ijwhost/bootstrap_thunk_chunk.cpp
src/installer/corehost/cli/ijwhost/ijwthunk.cpp

index 5df0348..9e0d698 100644 (file)
@@ -8,7 +8,7 @@
 //=================================================================================
 // Ctor
 bootstrap_thunk_chunk::bootstrap_thunk_chunk(size_t numThunks, pal::dll_t dll)
-    : m_dll(dll), m_numThunks(numThunks), m_next(NULL)
+    : m_dll(dll), m_numThunks(numThunks), m_next(nullptr)
 {
 #ifdef _DEBUG
     memset(m_thunks, 0, m_numThunks * sizeof(bootstrap_thunk));
index ee1734c..2b1e1c8 100644 (file)
@@ -183,6 +183,7 @@ bool are_thunks_installed_for_module(pal::dll_t instance)
         {
             return true;
         }
+        currentChunk = currentChunk->GetNext();
     }
 
     return false;