PT-2026-66823 · Crates.Io · Enum-Map
Publicado
2026-07-21
·
Atualizado
2026-07-21
Nenhuma
Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
Affected versions of this crate did not require the element type of the
Array associated type in the Enum trait to match the array's generic parameter V.This can result in type confusion, and consequently memory corruption, when a manual
Enum implementation declares an Array<V> whose elements are not actually of type V:rust
struct IntentionallyWrong;
impl Enum for IntentionallyWrong {
type Array<V> = [String; 4];
fn from usize( : usize) -> Self {
IntentionallyWrong
}
fn into usize(self) -> usize {
0
}
}
enum map! { IntentionallyWrong => 42 };The flaw was corrected in commit 7a8b815432 by adding a
Value = V bound to the Array type in the Enum trait. Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Enum-Map