ADVISORIES

RustSec Advisory Database

RUSTSEC-2021-0042

insert_many can drop elements twice on panic

Details

Affected versions of insert_many used ptr::copy to move over items in a vector to make space before inserting, duplicating their ownership. It then iterated over a provided Iterator to insert the new items.

If the iterator's .next() method panics then the vector would drop the same elements twice.

Affected packages

EcosystemPackageAffected versions
crates.ioinsert_many
From 0.0.0-0, no fix listed

References