Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null pointer safety to fx_bonusfire #330

Merged
merged 1 commit into from
Sep 19, 2016
Merged

Conversation

squeek502
Copy link
Member

@squeek502 squeek502 commented Sep 19, 2016

The entity sent over the network in the effect data could potentially not exist once it reaches the client, which would cause a null pointer crash

Contributes to #311

The entity sent over the network in the effect data could potentially not exist once it reaches the client, which would cause a null pointer crash
@squeek502
Copy link
Member Author

squeek502 commented Sep 19, 2016

Confirmed that this can occur:

  • Added this code: engine->ServerCommand(UTIL_VarArgs("kick %s\n", this->GetPlayerName())); right after DispatchEvent("BonusFire", data) in ff_player.cpp
  • Set net_fakelag to 200 (not sure if this is needed)
  • Added a bot, set him on fire and shot him with an IC to trigger the bonus fire effect
  • Bot gets kicked, ent index is received on the client and assumed to exist -> null pointer crash

Going to merge and release another hotfix since we know this is another crash.

@squeek502 squeek502 merged commit 4f2aa4f into beta Sep 19, 2016
@squeek502 squeek502 deleted the fixes/bonusfire-safety branch February 6, 2018 04:17
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.

None yet

1 participant