diff options
| author | dylni <46035563+dylni@users.noreply.github.com> | 2021-01-18 09:22:17 -0500 |
|---|---|---|
| committer | dylni <46035563+dylni@users.noreply.github.com> | 2021-02-12 22:01:04 -0500 |
| commit | cb647f3e8e32180cde0f0e7a2599a5dc5b35345a (patch) | |
| tree | 8a5eae31d65eb661db31c1e4f6e1c547a30b8af3 /library/alloc/src/vec | |
| parent | 9d29793614cc810fb8febf7f1a2e0202f3919bb6 (diff) | |
| download | rust-cb647f3e8e32180cde0f0e7a2599a5dc5b35345a.tar.gz rust-cb647f3e8e32180cde0f0e7a2599a5dc5b35345a.zip | |
Fix possible soundness issue in `ensure_subset_of`
Diffstat (limited to 'library/alloc/src/vec')
| -rw-r--r-- | library/alloc/src/vec/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/vec/mod.rs b/library/alloc/src/vec/mod.rs index 5c20f382224..1a7b846bd85 100644 --- a/library/alloc/src/vec/mod.rs +++ b/library/alloc/src/vec/mod.rs @@ -1650,7 +1650,7 @@ impl<T, A: Allocator> Vec<T, A> { // the hole, and the vector length is restored to the new length. // let len = self.len(); - let Range { start, end } = range.ensure_subset_of(..len); + let Range { start, end } = Range::ensure_subset_of(range, ..len); unsafe { // set self.vec length's to start, to be safe in case Drain is leaked |
