mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Game/ChatCommands: Make sure ChatHandler::extractPlayerTarget populates the strtok buffer for non-nullptr returns. Closes #25692, supersedes #25698.
(cherry picked from commit c8c572d980)
This commit is contained in:
@@ -585,6 +585,10 @@ bool ChatHandler::extractPlayerTarget(char* args, Player** player, ObjectGuid* p
|
||||
}
|
||||
else
|
||||
{
|
||||
// populate strtok buffer to prevent crashes
|
||||
static char dummy[1] = "";
|
||||
strtok(dummy, "");
|
||||
|
||||
Player* pl = getSelectedPlayerOrSelf();
|
||||
// if allowed player pointer
|
||||
if (player)
|
||||
|
||||
Reference in New Issue
Block a user