MCPcopy Create free account
hub / github.com/PLSysSec/wave / copy_buf_from_sandbox

Method copy_buf_from_sandbox

src/runtime.rs:128–135  ·  view source on GitHub ↗
(&self, src: SboxPtr, n: u32)

Source from the content-addressed store, hash-verified

126 #[ensures(trace_safe(trace, self))]
127 #[ensures(result.len() == (n as usize) )]
128 pub fn copy_buf_from_sandbox(&self, src: SboxPtr, n: u32) -> Vec<u8> {
129 let mut host_buffer: Vec<u8> = Vec::new();
130 host_buffer.reserve_exact(n as usize);
131 // assert!(src >= 0);
132 // assert!(((n as usize) < self.memlen) && ((n as usize) >= 0));
133 self.memcpy_from_sandbox(&mut host_buffer, src, n);
134 host_buffer
135 }
136
137 /// Copy buffer from from host to sandbox
138 #[with_ghost_var(trace: &mut Trace)]

Callers 1

translate_pathMethod · 0.80

Calls 1

memcpy_from_sandboxMethod · 0.80

Tested by

no test coverage detected