# RUSTSEC-2023-0081: safemem is unmaintained

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2023-02-14T12:00:00.000Z
- Modified: 2024-03-04T18:47:07.000Z

## Description

The latest crates.io release was in 2019. The repository has been archived by the author.

## Migration

- `safemem::copy_over(slice, src_idx, dest_idx, len);` can be replaced with `slice.copy_within(src_idx..src_idx+len, dest_idx);` as of `rust 1.37.0`.
- `safemem::write_bytes(slice, byte);` can be replaced with `slice.fill(byte);` as of `rust 1.50.0`
- `safemem::prepend(slice, vec);` can be replaced with

  ```rust
  let old_len = vec.len();
  vec.extend_from_slice(slice);
  vec.rotate_left(old_len);
  ```
  
  as of `rust 1.26.0`

(As written by RustSec Advisory Database.)

## Affected

- safemem (crates.io): from 0.0.0-0

## References

- <https://crates.io/crates/safemem> (package)
- <https://rustsec.org/advisories/RUSTSEC-2023-0081.html> (advisory)
- <https://github.com/abonander/safemem> (web)

## Sources

- RustSec Advisory Database: [RUSTSEC-2023-0081](https://rustsec.org/advisories/RUSTSEC-2023-0081.html), CC0-1.0, modified 2024-03-04

---

Page: https://cve.day/RUSTSEC-2023-0081 · Whole record: https://cve.day/RUSTSEC-2023-0081.json · Rebuilt by cve.day 2026-11-25T22:56:43.167Z
