We consider as_slice and as_slice_mut unsound because: the pointer with any bit patterns could be cast to the slice of arbitrary types. The pointer could be created by unsafe new and deprecated from_parts. We consider that from_parts should be removed in latest version because it will help trigger unsoundness in as_slice. With new declared as unsafe, as_slice should also declared as unsafe.
This was patched in by marking two functions as unsafe.
{
"github_reviewed": true,
"nvd_published_at": null,
"github_reviewed_at": "2024-12-30T16:52:46Z",
"severity": "LOW",
"cwe_ids": []
}