From c314ed1d8a2e735d542df1327f80672e286d969e Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 28 Jan 2019 19:54:50 +0100 Subject: [PATCH] [EU-FOSSA] DLL hijacking of plugins\Config\Config.dll loaded by Notepad++ --- PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp index 5158e36c..7eaa3704 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp @@ -320,7 +320,7 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir) if (hFindFolder != INVALID_HANDLE_VALUE && (foundData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { generic_string foundFileName = foundData.cFileName; - if (foundFileName != TEXT(".") && foundFileName != TEXT("..")) + if (foundFileName != TEXT(".") && foundFileName != TEXT("..") && generic_stricmp(foundFileName.c_str(), TEXT("Config")) != 0) { generic_string pluginsFullPathFilter = pluginsFolder; PathAppend(pluginsFullPathFilter, foundFileName); @@ -343,7 +343,7 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir) while (::FindNextFile(hFindFolder, &foundData)) { generic_string foundFileName2 = foundData.cFileName; - if (foundFileName2 != TEXT(".") && foundFileName2 != TEXT("..")) + if (foundFileName2 != TEXT(".") && foundFileName2 != TEXT("..") && generic_stricmp(foundFileName2.c_str(), TEXT("Config")) != 0) { generic_string pluginsFullPathFilter2 = pluginsFolder; PathAppend(pluginsFullPathFilter2, foundFileName2);