From 85d7215d9b3e0d5a8433fc31aec4f2966821051e Mon Sep 17 00:00:00 2001 From: SinghRajenM Date: Wed, 7 Sep 2022 09:53:15 +0530 Subject: [PATCH] Fixes security vulnerability Fix #12113, close #12114 --- PowerEditor/src/MISC/Exception/MiniDumper.cpp | 2 +- PowerEditor/src/Parameters.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/MISC/Exception/MiniDumper.cpp b/PowerEditor/src/MISC/Exception/MiniDumper.cpp index 9cb2d9963..48c22efdd 100644 --- a/PowerEditor/src/MISC/Exception/MiniDumper.cpp +++ b/PowerEditor/src/MISC/Exception/MiniDumper.cpp @@ -34,7 +34,7 @@ bool MiniDumper::writeDump(EXCEPTION_POINTERS * pExceptionInfo) LPCTSTR szResult = NULL; bool retval = false; - HMODULE hDll = ::LoadLibrary( TEXT("DBGHELP.DLL") ); //that wont work on older windows version than XP, #care :) + HMODULE hDll = ::LoadLibraryEx(TEXT("DBGHELP.DLL"), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); //that wont work on older windows version than XP, #care :) if (hDll) { diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 66cde374f..9233d44fc 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -1169,7 +1169,7 @@ bool NppParameters::load() //---------------------------------------------// // Dlg theme texture function for xp and vista // //---------------------------------------------// - _hUXTheme = ::LoadLibrary(TEXT("uxtheme.dll")); + _hUXTheme = ::LoadLibraryEx(TEXT("uxtheme.dll"), nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); if (_hUXTheme) _enableThemeDialogTextureFuncAddr = (WNDPROC)::GetProcAddress(_hUXTheme, "EnableThemeDialogTexture");