check_offset
if ((r = check_offset(buf, 0, offset, len)) != 0)
if ((r = check_offset(buf, 1, offset, len)) != 0)