From 5ebbba1d7c32ed8a7a87462291be424db78abef8 Mon Sep 17 00:00:00 2001 From: stm <14291421+stephanmeesters@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:14:37 +0100 Subject: [PATCH 1/2] fix(logic): Improve validation of MSG_SET_RALLY_POINT in GameLogicDispatch --- .../Source/GameLogic/System/GameLogicDispatch.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index f2483a1e159..7e69d6e9902 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -511,8 +511,21 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) { Object *obj = findObjectByID( msg->getArgument( 0 )->objectID ); Coord3D dest = msg->getArgument( 1 )->location; + if (obj) { +#if !RETAIL_COMPATIBLE_CRC + // TheSuperHackers @fix stephanmeesters 11/03/2026 Validate the owner of the source object + if ( obj->getControllingPlayer() != thisPlayer ) + { + DEBUG_CRASH( ("MSG_SET_RALLY_POINT: Player '%ls' attempted to set the rally point of object '%s' owned by player '%ls'.", + thisPlayer->getPlayerDisplayName().str(), + obj->getTemplate()->getName().str(), + obj->getControllingPlayer()->getPlayerDisplayName().str()) ); + break; + } +#endif + doSetRallyPoint( obj, dest ); } From 775f02220341da981947c80d36432ad87dd383eb Mon Sep 17 00:00:00 2001 From: stm <14291421+stephanmeesters@users.noreply.github.com> Date: Thu, 12 Mar 2026 12:57:42 +0100 Subject: [PATCH 2/2] Replicate in Generals --- .../Source/GameLogic/System/GameLogicDispatch.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp index d6a8a1aeac7..3f74fc32227 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/System/GameLogicDispatch.cpp @@ -502,8 +502,21 @@ void GameLogic::logicMessageDispatcher( GameMessage *msg, void *userData ) { Object *obj = findObjectByID( msg->getArgument( 0 )->objectID ); Coord3D dest = msg->getArgument( 1 )->location; + if (obj) { +#if !RETAIL_COMPATIBLE_CRC + // TheSuperHackers @fix stephanmeesters 11/03/2026 Validate the owner of the source object + if ( obj->getControllingPlayer() != thisPlayer ) + { + DEBUG_CRASH( ("MSG_SET_RALLY_POINT: Player '%ls' attempted to set the rally point of object '%s' owned by player '%ls'.", + thisPlayer->getPlayerDisplayName().str(), + obj->getTemplate()->getName().str(), + obj->getControllingPlayer()->getPlayerDisplayName().str()) ); + break; + } +#endif + doSetRallyPoint( obj, dest ); }