smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Avoid passing null pointer to slice creation

Open danieldg opened this issue 3 years ago • 0 comments

https://github.com/Smithay/smithay/blob/433a0f408d180c46ecb171e2c01d324ee997884a/src/wayland/shm/pool.rs#L162-L164

Passing null to slice::from_raw_parts is UB, see: https://doc.rust-lang.org/nightly/std/slice/fn.from_raw_parts.html

danieldg avatar Jul 31 '22 17:07 danieldg