The Special Marriage Act, 1954
26. Legitimacy of children of void and voidable marriages. –
Where a decree of nullity is granted in respect of any marriage under section 24 or section 25, any child begotten before the decree is made who would have been the legitimate child of the parties to the marriage if it had been dissolved instead of being declared to be null and void or annulled by a decree of nullity shall be deemed to be their legitimate child notwithstanding the decree of nullity:
Provided that nothing contained in this section shall be construed as conferring upon any child of a marriage which is declared to be null and void or annulled by a decree of nullity any rights in or to the property of any person other than the parents in any case where, but for the passing of this Act, such child would have been incapable of possessing or acquiring any such rights by reason of his not being the legitimate child of his parents.