Sahih al-Bukhari — Hadith 6428 (KitabGrid sequence)
Narrated Ibn Mas`ud:
حَدَّثَنِي إِسۡحَاقُ بۡنُ إِبۡرَاهِيمَ، سَمِعَ عَبۡدَ الۡعَزِيزِ بۡنَ عَبۡدِ الصَّمَدِ، حَدَّثَنَا مَنۡصُورٌ، عَنۡ إِبۡرَاهِيمَ، عَنۡ عَلۡقَمَةَ، عَنِ ابۡنِ مَسۡعُودٍ ـ رضى الله عنه أَنَّ نَبِيَّ اللَّهِ صلى الله عليه وسلم صَلَّى بِهِمۡ صَلاَةَ الظُّهۡرِ، فَزَادَ أَوۡ نَقَصَ مِنۡهَا ـ قَالَ مَنۡصُورٌ لاَ أَدۡرِي إِبۡرَاهِيمُ وَهِمَ أَمۡ عَلۡقَمَةُ ـ قَالَ قِيلَ يَا رَسُولَ اللَّهِ أَقَصُرَتِ الصَّلاَةُ أَمۡ نَسِيتَ قَالَ " وَمَا ذَاكَ ". قَالُوا صَلَّيۡتَ كَذَا وَكَذَا. قَالَ فَسَجَدَ بِهِمۡ سَجۡدَتَيۡنِ ثُمَّ قَالَ " هَاتَانِ السَّجۡدَتَانِ لِمَنۡ لاَ يَدۡرِي، زَادَ فِي صَلاَتِهِ أَمۡ نَقَصَ، فَيَتَحَرَّى الصَّوَابَ، فَيُتِمُّ مَا بَقِيَ، ثُمَّ يَسۡجُدُ سَجۡدَتَيۡنِ ".
Translation
Ishaq ibn Ibrahim narrated to me; he heard Abd al-Aziz ibn Abd al-Samad: Mansur narrated to us, from Ibrahim, from Alqamah, from Ibn Mas'ud رضي الله تعالى عنه:
The Prophet of Allah صلى الله عليه وآله وسلم led them in the noon prayer and added to it or omitted something from it. Mansur said, 'I do not know whether it was Ibrahim or Alqamah who was mistaken.' It was said, 'O Messenger of Allah صلى الله عليه وآله وسلم, has the prayer been shortened, or did you forget?' He said, 'What is that?' They said, 'You prayed such and such.' He performed two prostrations with them and then said, 'These two prostrations are for someone who does not know whether he added to his prayer or omitted from it. Let him seek what is correct, complete what remains, then perform two prostrations.'
Ready.