PT-2026-55569 · Crates.Io · Cgmath
Publicado
2026-03-11
·
Atualizado
2026-03-11
Nenhuma
Não há classificações de severidade ou métricas disponíveis. Quando houver, atualizaremos as informações correspondentes na página.
The
Matrix2::swap columns, Matrix3::swap columns, and Matrix4::swap columns
implementations call ptr::swap(&mut self[a], &mut self[b]).When
a == b, these safe APIs create two mutable references to the same matrix
column and pass them to ptr::swap. This violates Rust's aliasing rules and can
trigger undefined behavior. The issue can be reproduced from safe Rust by calling
swap columns with identical column indices, for example m.swap columns(0, 0).A minimal fix is to return early when the two column indices are equal before
calling
ptr::swap. Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾
Identificadores relacionados
Produtos afetados
Cgmath