fn advance(pos: usize, len: usize, limit: usize) -> Result<usize, PatchError>
Advances pos by len and checks that it stays within limit.
pos
len
limit