compilation error fix

This commit is contained in:
Artyom Pavlov
2019-10-28 17:57:29 +00:00
committed by GitHub
parent 8e6f4c448b
commit 56475594e9

View File

@ -39,7 +39,7 @@ pub fn ___syscall5(ctx: &mut Ctx, which: c_int, mut varargs: VarArgs) -> c_int {
let mut urandom_file = File::create(tmp_dir).unwrap();
// create some random bytes and put them into the file
let mut random_bytes = [0u8; 32];
getrandom::getrandom(random_bytes).unwrap();
getrandom::getrandom(&mut random_bytes).unwrap();
let _ = urandom_file.write_all(&random_bytes).unwrap();
// put the file path string into wasm memory
let urandom_file_offset = unsafe { copy_cstr_into_wasm(ctx, ptr) };