vbo: if 'end' is out of bounds, clamp it