It won't overflow. That should be obvious since doing so would create a constant flow, constantly using energy, but without any energy input. The same force that pulls the water along the inside of the capillary tube also holds it there when it reaches the end. This force doesn't just pull upward, it pulls the water along the glass. At a certain height, the weight of the water column balances this pull. In that case the pull is upward since there is water below but not above.