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
let sentinel_slice = crate::transmute::<_,&[u8]>([0usize,1usize]);
With std::mem::transmute this causes time-travelling UB: compiler concludes that the only way we could get 0 here is by failing unwrap() few lines prior. The simple solution would be to use 1usize and 2usize to deduce the slice pointer layout or just assume that the pointer goes first - it's not the end of the world.
This prevents removing #[inline(never)] in the implementation of transmute().
The text was updated successfully, but these errors were encountered:
The main offender is
download_more_ram()
that converts 0 to a pointer.cve-rs/src/lib.rs
Line 105 in ab0d48f
With
std::mem::transmute
this causes time-travelling UB: compiler concludes that the only way we could get0
here is by failingunwrap()
few lines prior. The simple solution would be to use1usize
and2usize
to deduce the slice pointer layout or just assume that the pointer goes first - it's not the end of the world.This prevents removing
#[inline(never)]
in the implementation oftransmute()
.The text was updated successfully, but these errors were encountered: