pub fn safe_copy(dst: &mut [u8], src: &[u8]) -> usize
Only copy the 0..min(dst, src) of src to dst, return the bytes copied.