Skip to content

Commit ba80200

Browse files
committed
Fix EAC anti-cheat callback use-after-free (worker-thread safe)
1 parent d48d6aa commit ba80200

3 files changed

Lines changed: 334 additions & 104 deletions

File tree

GeneralsMD/Code/GameEngine/Include/GameNetwork/GeneralsOnline/PluginInterfaces.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class AnticheatPlugInterface
5353

5454
static void BeginSession();
5555
static void EndSession();
56+
static void RegisterHostCallbacks();
5657

5758
// Callbacks from plugin
5859
typedef void (*LoginCallback)(bool bSuccess);
@@ -84,6 +85,7 @@ class AnticheatPlugInterface
8485
typedef void (*FuncDefTick)(void);
8586

8687
typedef void (*FuncDefShutdown)(void);
88+
typedef void (*FuncDefClearAllHostCallbacks)(void);
8789

8890
struct AnticheatPluginFunctionPtrs
8991
{
@@ -105,6 +107,7 @@ class AnticheatPlugInterface
105107
FuncDefDeregisterPlayer fnDeregisterPlayer = nullptr;
106108
FuncDefTick fnTick = nullptr;
107109
FuncDefShutdown fnShutdown = nullptr;
110+
FuncDefClearAllHostCallbacks fnClearAllHostCallbacks = nullptr;
108111
};
109112
static AnticheatPluginFunctionPtrs Functions;
110113

0 commit comments

Comments
 (0)