Browse Source

DLL hijacking protection

Source commit: 6c21a564301c8fa29d82456a1e3b8cfb78db8f36
Martin Prikryl 9 years ago
parent
commit
5703da35e1
3 changed files with 8 additions and 0 deletions
  1. 1 0
      source/WinSCP.cpp
  2. 5 0
      source/core/PuttyIntf.cpp
  3. 2 0
      source/core/PuttyTools.h

+ 1 - 0
source/WinSCP.cpp

@@ -12,6 +12,7 @@ USEFORM("forms\ScpExplorer.cpp", ScpExplorerForm);
 #include <ProgParams.h>
 #include <VCLCommon.h>
 #include <Setup.h>
+#include <PuttyTools.h>
 //---------------------------------------------------------------------------
 WINAPI wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
 {

+ 5 - 0
source/core/PuttyIntf.cpp

@@ -774,4 +774,9 @@ UnicodeString __fastcall Sha256(const char * Data, size_t Size)
   return Result;
 }
 //---------------------------------------------------------------------------
+void __fastcall DllHijackingProtection()
+{
+  dll_hijacking_protection();
+}
+//---------------------------------------------------------------------------
 //---------------------------------------------------------------------------

+ 2 - 0
source/core/PuttyTools.h

@@ -32,4 +32,6 @@ UnicodeString __fastcall GetPuTTYVersion();
 //---------------------------------------------------------------------------
 UnicodeString __fastcall Sha256(const char * Data, size_t Size);
 //---------------------------------------------------------------------------
+void __fastcall DllHijackingProtection();
+//---------------------------------------------------------------------------
 #endif