Azure / service-fabric-rs

Service Fabric Rust
MIT License
6 stars 7 forks source link

Correctly validate pointers are non-null #33

Closed jrahman closed 4 months ago

jrahman commented 4 months ago

Rust 1.78 will now validate preconditions to unsafe standard library functions. This includes std::slice::from_raw_parts which validates the pointer is: 1) Non-null 2) Correctly aligned

In this case, initializationdata can be null, so we need to correctly address that by returning an empty slice explicitly rather than calling from_raw_parts() will a nullptr.