Arabic text
عن جابر رضي الله عنهما قال: قال رسول الله صلى الله عليه وسلم: «لن يدخلَ النارَ رجلٌ شَهِد بدرًا والحُدَيْبِيَة».
Translation
Jābir (may Allah be pleased with him and his father) reported: The Messenger of Allah (may Allah's peace and blessings be upon him) said: "A man who took part in Badr and Hudaybiyah will not enter Hellfire."
Explanation
The Prophet (may Allah's peace and blessings be upon him) informed that anyone who attended the Battle of Badr, which took place in the second year of Hijrah, fighting alongside the Prophet (may Allah's peace and blessings be upon him), or attended the Treaty of Hudaybiyah, which included the Pledge of Ridwān in the sixth year of Hijrah, will not enter Hellfire.
Source: HadeethEnc.com