From c9a393fa7d08ff1adc95530855f9eac2ea559032 Mon Sep 17 00:00:00 2001 From: FusixGit Date: Tue, 9 Dec 2014 06:52:51 +0300 Subject: [PATCH] Fix pointers --- src-x86-x64-Fusix/RDPWrap.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src-x86-x64-Fusix/RDPWrap.cpp b/src-x86-x64-Fusix/RDPWrap.cpp index 4774be3..acea735 100644 --- a/src-x86-x64-Fusix/RDPWrap.cpp +++ b/src-x86-x64-Fusix/RDPWrap.cpp @@ -714,10 +714,8 @@ void Hook() Bool = IniFile->GetVariableInSection(Sect, "LocalOnlyCode.x86", &PatchName); #endif if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); - // Patch.Value is char - // WriteProcessMemory uses LPCVOID lpBuffer, so... - // maybe &Patch.Value ? - if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw); + + if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw); } #ifdef _WIN64 if (!(IniFile->GetVariableInSection(Sect, "SingleUserPatch.x64", &Bool))) Bool = false; @@ -736,10 +734,8 @@ void Hook() Bool = IniFile->GetVariableInSection(Sect, "SingleUserCode.x86", &PatchName); #endif if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); - // Patch.Value is char - // WriteProcessMemory uses LPCVOID lpBuffer, so... - // maybe &Patch.Value ? - if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw); + + if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw); } #ifdef _WIN64 if (!(IniFile->GetVariableInSection(Sect, "DefPolicyPatch.x64", &Bool))) Bool = false; @@ -758,10 +754,8 @@ void Hook() Bool = IniFile->GetVariableInSection(Sect, "DefPolicyCode.x86", &PatchName); #endif if (Bool) Bool = IniFile->GetVariableInSection("PatchCodes", PatchName.Value, &Patch); - // Patch.Value is char - // WriteProcessMemory uses LPCVOID lpBuffer, so... - // maybe &Patch.Value ? - if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, Patch.Value, Patch.ArraySize, &bw); + + if (Bool && (SignPtr > TermSrvBase)) WriteProcessMemory(GetCurrentProcess(), (LPVOID)SignPtr, &Patch.Value, Patch.ArraySize, &bw); } #ifdef _WIN64 if (!(IniFile->GetVariableInSection(Sect, "SLPolicyInternal.x64", &Bool))) Bool = false;