Skip to content

Validate kart IDs in soccer goal notifications - #5883

Open
acts-1631 wants to merge 1 commit into
supertuxkart:masterfrom
acts-1631:fix-soccer-goal-notification
Open

acts-1631 wants to merge 1 commit into
supertuxkart:masterfrom
acts-1631:fix-soccer-goal-notification

Conversation

@acts-1631

Copy link
Copy Markdown
Contributor

GE_PLAYER_GOAL includes the scorer’s kart ID. SoccerWorld::handlePlayerGoalFromServer later uses that ID to index m_karts for the scoring animation, but did not verify that it refers to a local kart. A malformed or mismatched server notification could therefore take a client out of the game.

This verifies the ID against the local kart list before updating score state or accessing the kart.

Reject goal notifications with an out-of-range kart ID before
indexing the local kart array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant