qcow: add a safety comment
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
c4ffdad4bc
commit
ca02a69fdf
1 changed files with 1 additions and 0 deletions
|
|
@ -231,6 +231,7 @@ impl Write for RawFile {
|
|||
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) };
|
||||
|
||||
// This can eventually replaced with read_at once its interface
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue