{"id":"RUSTSEC-2023-0081","aliases":["RUSTSEC-2023-0081"],"related":[],"kind":"vulnerability","state":"published","title":"safemem is unmaintained","summary":"The latest crates.io release was in 2019. The repository has been archived by the author.\n\n## Migration\n\n- `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`.\n- `safemem::write_bytes(slice, byte);` can be replaced with `slice.fill(byte);` as of `rust 1.50.0`\n- `safemem::prepend(slice, vec);` can be replaced with\n\n  ```rust\n  let old_len = vec.len();\n  vec.extend_from_slice(slice);\n  vec.rotate_left(old_len);\n  ```\n  \n  as of `rust 1.26.0`","summaryFormat":"markdown","summarySource":"rustsec","descriptions":[{"lang":"en","text":"The latest crates.io release was in 2019. The repository has been archived by the author.\n\n## Migration\n\n- `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`.\n- `safemem::write_bytes(slice, byte);` can be replaced with `slice.fill(byte);` as of `rust 1.50.0`\n- `safemem::prepend(slice, vec);` can be replaced with\n\n  ```rust\n  let old_len = vec.len();\n  vec.extend_from_slice(slice);\n  vec.rotate_left(old_len);\n  ```\n  \n  as of `rust 1.26.0`","format":"markdown","source":"rustsec"}],"published":"2023-02-14T12:00:00.000Z","modified":"2024-03-04T18:47:07.000Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected"}],"ecosystem":"crates.io","package":"safemem","purl":"pkg:cargo/safemem","source":"rustsec"}],"references":[{"url":"https://crates.io/crates/safemem","tags":["package"],"sources":["rustsec"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0081.html","tags":["advisory"],"sources":["rustsec"]},{"url":"https://github.com/abonander/safemem","tags":["web"],"sources":["rustsec"]}],"credits":[],"sources":[{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2023-0081","url":"https://rustsec.org/advisories/RUSTSEC-2023-0081.html","licence":"CC0-1.0","modified":"2024-03-04T18:47:07.000Z"}],"updatedAt":"2026-11-25T22:56:43.167Z"}