Fix bug in localized strings code
This commit is contained in:
parent
0a1c1209bb
commit
d0932060b4
@ -120,6 +120,11 @@ namespace Components
|
||||
InterlockedIncrement(&Game::deferredQueue->send);
|
||||
}
|
||||
|
||||
void Security::SEH_LocalizeTextMessageStub(char* dest, const char* src, [[maybe_unused]] int destsize)
|
||||
{
|
||||
Game::I_strncpyz(dest, src, 1024);
|
||||
}
|
||||
|
||||
Security::Security()
|
||||
{
|
||||
// Exploit fixes
|
||||
@ -147,5 +152,8 @@ namespace Components
|
||||
|
||||
// Fix packets causing buffer overflow
|
||||
Utils::Hook(0x6267E3, NET_DeferPacketToClientStub, HOOK_CALL).install()->quick();
|
||||
|
||||
// Use the correct size for the destination buffer
|
||||
Utils::Hook(0x49D548, SEH_LocalizeTextMessageStub, HOOK_CALL).install()->quick();
|
||||
}
|
||||
}
|
||||
|
@ -22,5 +22,7 @@ namespace Components
|
||||
static void G_LogPrintfStub(const char* fmt);
|
||||
|
||||
static void NET_DeferPacketToClientStub(Game::netadr_t* net_from, Game::msg_t* net_message);
|
||||
|
||||
static void SEH_LocalizeTextMessageStub(char* dest, const char* src, int destsize);
|
||||
};
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ BOOL APIENTRY DllMain(HINSTANCE /*hinstDLL*/, DWORD fdwReason, LPVOID /*lpvReser
|
||||
{
|
||||
if (fdwReason == DLL_PROCESS_ATTACH)
|
||||
{
|
||||
SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
|
||||
Steam::Proxy::RunMod();
|
||||
|
||||
#ifndef DISABLE_BINARY_CHECK
|
||||
|
Loading…
Reference in New Issue
Block a user