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

CRpgRocket could access freed memory #1719

Open
SamVanheer opened this issue Jun 30, 2016 · 0 comments
Open

CRpgRocket could access freed memory #1719

SamVanheer opened this issue Jun 30, 2016 · 0 comments

Comments

@SamVanheer
Copy link

SamVanheer commented Jun 30, 2016

CRpgRocket could potentially access freed memory under specific circumstances.

If a player launches a rocket using an rpg, and is then stripped of all weapons, that rpg is removed altogether. The rocket will access the rpg when it hits a target to update its rocket counter. Depending on heap allocation behavior the now freed region could still be valid to access.

To fix this, the rpg rocket's pointer to the rpg needs to be changed into an EHANDLE.

Line that needs to be changed:

CRpg *m_pLauncher;// pointer back to the launcher that fired me.

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 a pull request may close this issue.

1 participant