Abu Salama reported,

A man came to Ibn Abbas while Abu Hurairah was sitting with him and said, "Give me a ruling concerning a woman who gave birth forty nights after her husband's death."Ibn Abbas said, "Her waiting period is the longer of the two terms."I said, "And those who are pregnant, their term is until they give birth" [Talaq 65:4].Abu Hurairah said, "I am with my nephew," meaning Abu Salama.So Ibn Abbas sent his servant Kurayb to Umm Salama to ask her about it. She said, "The husband of Sabi al-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 had proposed to her."

Bukhari 4909

Sahih

حدثنا سعد بن حفص حدثنا شيبان عن يحيى قال أخبرني

أبو سلمة قال

جاء رجل إلى ابن عباس وأبو هريرة جالس عنده فقال أفتني في امرأة ولدت بعد زوجها بأربعين ليلة فقال ابن عباس آخر الأجلين قلت أنا {وأولات الأحمال أجلهن أن يضعن حملهن} قال أبو هريرة أنا مع ابن أخي يعني أبا سلمة فأرسل ابن عباس غلامه كريبا إلى أم سلمة يسألها فقالت قتل زوج سبيعة الأسلمية وهي حبلى فوضعت بعد موته بأربعين ليلة فخطبت فأنكحها رسول الله ﷺ وكان أبو السنابل فيمن خطبها

البخاري 4909صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
"And for those who are pregnant, their term is until they deliver. And whoever fears Allah, He will make his matter easy for him." Those who are pregnant, the singular is one who is pregnant
Numbering
Darussalam 4909
Bukhari 4909