Fix use after free in cell attack - #397
Closed
vincent-noel wants to merge 1 commit into
Closed
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update
I updated this PR to only include cell attack, and updated the title accordingly.
Initially, when deleting a cell, I would look for all cells to see if it was a target of another cell, and if so clean the pAttackTarget.
I now modified the PR for cells to have a list of cells they are attacked by. That way, when deleting the cell, we know which cells we have to cleanup.
I think that together with #409 and #410, we have a good fix for the issues that this PR was initially tackling.
initial PR
I had some crash that I wanted to fix for a while, and finally found the issues:
Here the fixes I'm proposing for now:
Clearly, this can be improved, but it fixes the present issues.