RUSTSEC-2020-0145: heapless: Use-after-free when cloning a partially consumed `Vec` iterator

Description

The IntoIter Clone implementation clones the whole underlying Vec. If the iterator is partially consumed the consumed items will be copied, thus creating a use-after-free access.

A proof of concept is available in the original bug report.

More Info

https://github.com/japaric/heapless/issues/181

Patched Versions