Lucene search
+L

3 matches found

OSV
OSV
added 2022/12/30 5:48 p.m.17 views

GHSA-GFGM-CHR3-X6PX prettytable-rs: Force cast a &Vec<T> to &[T] may lead to undefined behavior

In function Table::asref, a reference of vector is force cast to slice. There are multiple problems here: 1. To guarantee the size is correct, we have to first do Vec::shrinktofit. The function requires a mutable reference, so we have to force cast from immutable to mutable, which is undefined...

7.1AI score
SaveExploits0References3
Github Security Blog
Github Security Blog
added 2022/12/30 5:48 p.m.21 views

prettytable-rs: Force cast a &Vec<T> to &[T] may lead to undefined behavior

In function Table::asref, a reference of vector is force cast to slice. There are multiple problems here: 1. To guarantee the size is correct, we have to first do Vec::shrinktofit. The function requires a mutable reference, so we have to force cast from immutable to mutable, which is undefined...

1.7AI score
SaveExploits0References3Affected Software1
OSV
OSV
added 2022/12/02 12:0 p.m.16 views

RUSTSEC-2022-0074 Force cast a &Vec<T> to &[T]

In function Table::asref, a reference of vector is force cast to slice. There are multiple problems here: 1. To guarantee the size is correct, we have to first do Vec::shrinktofit. The function requires a mutable reference, so we have to force cast from immutable to mutable, which is UB. 2. Even ...

7.1AI score
SaveExploits0References3
Rows per page
Query Builder