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

Update DrainFilter.idx after calling DrainFilter.pred #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LiquidityC
Copy link

Removes security issue where a panic! from DrainFilter.pred
would leave DrainFilter.idx incremented and risking a double drop.

Fixes: #90

Removes security issue where a panic! from DrainFilter.pred
would leave DrainFilter.idx incremented and risking a double drop.

Fixes: #90
@LiquidityC
Copy link
Author

I attempted to write a good test for this but since triggering the problem requires a panic! and those don't play well with the rust test framework I couldn't produce anything robust that I was happy with. Just give me some pointers if there is some sort of test you'd like to see here.

@Moxinilian
Copy link

@gnzlbg any plan on getting this merged + released?

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.

Panic safety issue in SliceDeque::drain_filter
2 participants