Lucene search

K
rustsecRustsecRUSTSEC-2021-0042
HistoryJan 26, 2021 - 12:00 p.m.

insert_many can drop elements twice on panic

2021-01-2612:00:00
rustsec.org
7

0.001 Low

EPSS

Percentile

46.4%

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.

CPENameOperatorVersion
insert_manyeqany

0.001 Low

EPSS

Percentile

46.4%

Related for RUSTSEC-2021-0042