fix off-by-one error Fixes https://github.com/rust-lang/rust/issues/47325.
Write
Cursor<&mut Vec<T>>
sys