Skip to content
Snippets Groups Projects
Verified Commit 4973935b authored by Jacob Lorentzon's avatar Jacob Lorentzon
Browse files

Limit src len to dst len in uio::scatter().

parent 1ef79540
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,7 @@ unsafe fn scatter(iovs: &[iovec], vec: Vec<u8>) {
let mut i = 0;
for iov in iovs.iter() {
let slice = iov.to_slice();
slice.copy_from_slice(&vec[i..]);
slice.copy_from_slice(&vec[i..][..slice.len()]);
i += slice.len();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment