mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +00:00
qcow: add a safety comment
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
c4ffdad4bc
commit
ca02a69fdf
@ -231,6 +231,7 @@ impl Write for RawFile {
|
|||||||
return Err(io::Error::last_os_error());
|
return Err(io::Error::last_os_error());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SAFETY: tmp_ptr is at least rounded_len long
|
||||||
let tmp_buf = unsafe { slice::from_raw_parts_mut(tmp_ptr, rounded_len) };
|
let tmp_buf = unsafe { slice::from_raw_parts_mut(tmp_ptr, rounded_len) };
|
||||||
|
|
||||||
// This can eventually replaced with read_at once its interface
|
// This can eventually replaced with read_at once its interface
|
||||||
|
Loading…
Reference in New Issue
Block a user