In function Table::as_ref, a reference of vector is force cast to slice. There are multiple problems here:
Vec::shrink_to_fit. The function requires a mutable reference, so we have to force cast from immutable to mutable, which is undefined behavior (UB).&Vec<T> and &[T] still might not have the same layout. Treating them equally may lead to undefinted behavior (UB).{
"cwe_ids": [],
"github_reviewed": true,
"github_reviewed_at": "2022-12-30T17:48:30Z",
"nvd_published_at": null,
"severity": "MODERATE"
}