-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from ammaraskar/slice-deque
Report double-free in slice-deque
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
```toml | ||
[advisory] | ||
id = "RUSTSEC-0000-0000" | ||
package = "slice-deque" | ||
date = "2021-02-19" | ||
url = "https://github.com/gnzlbg/slice_deque/issues/90" | ||
categories = ["memory-corruption"] | ||
keywords = ["memory-safety", "double-free"] | ||
|
||
[versions] | ||
patched = [] | ||
``` | ||
|
||
# SliceDeque::drain_filter can double drop an element if the predicate panics | ||
|
||
Affected versions of the crate incremented the current index of the drain filter | ||
iterator *before* calling the predicate function `self.pred`. | ||
|
||
If the predicate function panics, it is possible for the last element in the | ||
iterator to be dropped twice. |