mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Static Code Analysis : fix non-absolute DLL/process loads that can be hijacked (Microsoft Security Advisory 2269637).
This commit is contained in:
@@ -2012,7 +2012,14 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszComm
|
||||
}
|
||||
|
||||
// System Restore
|
||||
SystemRestoreDll = LoadLibrary ("srclient.dll");
|
||||
char dllPath[MAX_PATH];
|
||||
if (GetSystemDirectory (dllPath, MAX_PATH))
|
||||
{
|
||||
strcat(dllPath, "\\srclient.dll");
|
||||
}
|
||||
else
|
||||
strcpy(dllPath, "C:\\Windows\\System32\\srclient.dll");
|
||||
SystemRestoreDll = LoadLibrary (dllPath);
|
||||
|
||||
if (!bUninstall)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user