He heard the Prophet ﷺ say, "No man accuses another of wickedness or accuses him of disbelief except that it returns upon him if his companion is not as he claimed."
أنه سمع النبي ﷺ يقول: لا يرمي رجل رجلا بالفسوق، ولا يرميه بالكفر إلا ارتدت عليه إن لم يكن صاحبه كذلك.
Bukhari narrated it in Adab (6045), and Muslim in Iman (61), both from the hadith of Abdul-Warith, from Husayn Muallim, from Abdullah bin Burayda, who said, Yahya bin Yamar told me that Abul-Aswad Dili told him, from Abu Dharr, and he related the hadith, and the wording given is that of Bukhari. The wording of Muslim is as mentioned in the chapter explaining the status of the faith of one who disowns his father while knowing he is his father.