RUSTSEC-2021-0042
on 2021-01-26: insert_many can drop elements twice on panic
This crate has no reviews yet. To add a review, set up your cargo-crev
.
Crates in the crates.io registry are tarball snapshots uploaded by crates' publishers. The registry is not using crates' git repositories. There is absolutely no guarantee that the repository URL declared by the crate belongs to the crate, or that the code in the repository is the code inside the published tarball.
To review the actual code of the crate, it's best to use cargo crev open insert_many
. Alternatively, you can download the tarball of insert_many v0.1.1 or view the source online.
Affected versions of
insert_many
usedptr::copy
to move over items in a vector to make space before inserting, duplicating their ownership. It then iterated over a providedIterator
to insert the new items.If the iterator's
.next()
method panics then the vector would drop the same elements twice.CVE-2021-29933
GHSA-29hg-r7c7-54fr