حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ الْعَزِيزِ، ثنا عَارِمٌ أَبُو النُّعْمَانِ، ثنا سَعِيدُ بْنُ زَيْدٍ، ثنا عَلِيُّ بْنُ الْحَكَمِ، ثنا أَبُو نَضْرَةَ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ يَرْفَعُهُ إِلَى النَّبِيِّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ قَالَ: «إِذَا وَهِمَ الرَّجُلُ فِي صَلَاتِهِ، فَلَمْ يَدْرِ أَزَادَ أَمْ نَقَصَ، فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ»
It is narrated from Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him), who attributes it to the Prophet (peace and blessings be upon him), that he said: "When a man becomes confused in his prayer and does not know whether he has added or omitted something, let him perform two prostrations while sitting."