RUSTSEC-2020-0039: simple-slab: `index()` allows out-of-bound read and `remove()` has off-by-one error

Description

Slab::index() does not perform the boundary checking, which leads to out-of-bound read access. Slab::remove() copies an element from an invalid address due to off-by-one error, resulting in memory leakage and uninitialized memory drop.

More Info

https://github.com/nathansizemore/simple-slab/issues/2

Patched Versions