You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix unsoundness in FromBytes::new_box_slice_zeroed (#63)
Previously, `FromBytes::new_box_slice_zeroed` called
`Layout::from_size_align_unchecked` with arguments that could overflow
`isize`, which would violate its safety preconditions. In this change,
we use the safe variant, which returns a `Result` which we can
`.expect()`. Though I haven't benchmarked it, this likely has little
impact on performance over the optimal code since optimal code would
still need to perform the same bounds check that `from_size_align` is
performing.
0 commit comments