If real estate is lawfully sold by a sheriff, assignee in bankruptcy or other public officer, whereby an inchoate right of dower or curtesy does or shall remain, the purchaser shall have the right, in an action in the Superior Court to have one half part thereof, or such other part according to the law in force when the right or estate became vested, admeasured and set off as and for the dower or curtesy portion.
N.J.S. § 3A:36-4