A man came to Ibn Abbas while Abu Hurairah was sitting with him and said, "Give me a ruling about a woman whose husband died and who then gave birth forty nights later."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 his servant Kurayb to Umm Salama to ask her, 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 ﷺ married her off. Abu Sanabil was among those who proposed to her."
جاء رجل إلى ابن عباس، و أبو هريرة جالس عنده فقال: أفتني في امرأة ولدت بعد زوجها بأربعين ليلة؟ فقال ابن عباس: آخر الأجلين. قلت أنا: {وأولت الأحمال أجلهن أن يضعن حملهن} قال أبو هريرة: أنا مع ابن أخي، يعني أبا سلمة، فأرسل ابن عباس غلامه كريبا إلى أم سلمة يسألها، فقالت: قتل زوج سبيعة الأسلمية وهي حبلى، فوضعت بعد موته بأربعين ليلة، فخطبت، فأنكحها رسول الله ﷺ، وكان أبو السنابل فيمن خطبها.
Bukhari narrated it in the tafsir (4909) from Saad bin Hafs, who said, Shayban narrated to us, from Yahya, who said, Abu Salama informed me, who said, and then he mentioned it. Muslim also narrated it in the divorce (1485) through another route from Abu Salama, similarly.