cryptovec: use NonNull::dangling instead of potentially dangled member pointer
[?]
Jan 12, 2021, 10:09 AM
CSYBOTTDUSW4DBIDMDVBQJFVFD3BA73MJNB5MRICBDGC23W6P7GACDependencies
- [2]
7FRJYUI6Reboot because of a bad change
Change contents
- edit in cryptovec/src/lib.rs at line 29
zero: u8, - replacement in cryptovec/src/lib.rs at line 137
let mut buf = CryptoVec {p: std::ptr::null_mut(),CryptoVec {p: std::ptr::NonNull::dangling().as_ptr(), - replacement in cryptovec/src/lib.rs at line 141
zero: 0,};// This avoids potential problems in as_slice().buf.p = &mut buf.zero;//buf} - edit in cryptovec/src/lib.rs at line 193
zero: 0, - edit in cryptovec/src/lib.rs at line 208
zero: 0,