boundary check for buffer offset when concurrent write occurs