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
pub fn as_bytes(&self) -> &[u8] {
unsafe { slice::from_raw_parts(self.offset as *const u8, self.length as usize) }
}
I'm not sure if this code has an unsound problem, but it calls from_raw_parts without any checks. Although memory is a private mod, I decided to report the issue because I didn't see any //SAFETY to indicate this.
The text was updated successfully, but these errors were encountered:
I'm pretty sure it's not unsound because the only way we create the Regions is from a Vec or from a slice which both should fulfill all the safety requirements.
But it's always a good idea to document this.
cosmwasm/packages/std/src/memory.rs
Line 105 in b5ee955
I'm not sure if this code has an unsound problem, but it calls
from_raw_parts
without any checks. Althoughmemory
is a private mod, I decided to report the issue because I didn't see any//SAFETY
to indicate this.The text was updated successfully, but these errors were encountered: