The Messenger of Allah ﷺ was in the house of Hafsa when he said, "No one who witnessed Badr or al-Hudaybiyya will enter the Fire."Hafsa said, "Does Allah not say, 'And there is none of you except he will come to it' [Maryam 19:71]?"She said that the Messenger of Allah ﷺ replied, "And then? 'Then We will save those who feared Allah' [Maryam 19:72]."
حدثنا ابن إدريس قال حدثنا الأعمش عن أبي سفيان عن جابر
كان رسول الله ﷺ في بيت حفصة فقال لا يدخل النار أحد شهد بدرا والحديبية قالت حفصة أليس الله عز وجل يقول {وإن منكم إلا واردها} قالت قال رسول الله ﷺ فمه {ثم ننجي الذين اتقوا}
Its chain of transmission is sahih. It was narrated in this way by Muslim, 4/1942, no. 2496, and by Tabarani in Al-Kabir, 25/102, no. 265. Haythami said, 9/304, "The narrators of Ahmad and Tabarani are the narrators of the Sahih." It has already appeared with similar wording from Jabir. See 14714.