A man came to Ibn Abbas while Abu Hurairah was sitting with him and said, "Give me a ruling about a woman who gave birth forty nights after her husband died."Ibn Abbas replied, "She must observe the longer of the two waiting periods."I said, "And for those who are pregnant, their term is until they deliver" [Talaq 65:4].Abu Hurairah said, "I side with my nephew," meaning Abu Salama.So Ibn Abbas sent Kurayb to Umm Salama to ask her about it, and she said, "The husband of Subayah Aslamiyyah was killed while she was pregnant, and she gave birth forty nights after his death. She was then proposed to, and the Messenger of Allah ﷺ gave her in marriage. Abu Sanabil was among those who proposed to her."
جاء رجل إلى ابن عباس، وأبو هريرة. جالس عنده فقال: أفتني في امرأة ولدت بعد زوجها بأربعين ليلة، فقال ابن عباس آخر الأجلين. قلت أنا: {وأولت الأحمال أجلهن أن يضعن حملهن} [الطلاق: ٤] قال أبو هريرة: أنا مع ابن أخي، يعني أبا سلمة، فأرسل ابن عباس كريبا إلى أم سلمة، يسألها، فقالت: قتل زوج سبيعة الأسلمية وهي حبلي، فوضعت بعد موته بأربعين ليلة، فخطبت، فأنكحها رسول الله ﷺ وكان أبو السنابل فيمن خطبها.
Bukhari related it in the Tafsir (4909) from Saad bin Hafs, who said, Shayban told us, from Yahya (that is, Ibn Abu Kathir), who said, Abu Salama informed me, and then he mentioned it.Malik related it in the Divorce chapter (86), and Muslim in the Divorce chapter (1485) through Abdul-Wahhab, both of them from Yahya bin Saeed (that is, Al-Ansari), from Sulayman bin Yasar, that Abdullah bin Abbas and Abu Salama bin Abdul-Rahman bin Awf disagreed about a woman who gave birth some nights after the death of her husband... and he mentioned the hadith in a similar way. In Malik's wording, "You have become lawful, so marry whomever you wish."The narrations differ in specifying the number of days for her giving birth after the death of her husband, and preference is given to what is found in the Sahihayn, but the important point is that she becomes lawful as soon as she gives birth, without any restriction from the Lawgiver specifying the number of days.