كتاب الحج
15  
The Book of Pilgrimage
(85)
Chapter: The virtue of Al-Madinah and the Prophet's Prayer for it to be blessed. Its sanctity and the sanctity of its game and trees. The Boundaries of its sanctuary
(85)
باب فَضْلِ الْمَدِينَةِ وَدُعَاءِ النَّبِيِّ صلى الله عليه وسلم فِيهَا بِالْبَرَكَةِ وَبَيَانِ تَحْرِيمِها وَتَحْرِيمِ صَيْدِهَا وَشَجَرِهَا وَبَيَانِ حُدُودِ حَرَمِهَا
Sahih Muslim 1370 b

A hadith like this has been narrated on the authority of A'mash with the same chain of transmitters (but at the end) these words are added:

" He who violated the covenant with a Muslim, there is upon him the curse of Allah, of angels and of all people. Neither an obligatory act nor a supererogatory act would be accepted from him as recompense on the Day of Resurrection; and in the hadith transmitted by two other narrators these words are not found:" He who claimed false paternity." And in the hadith transmitted by Waki' there is no mention of the Day of Resurrection.
وَحَدَّثَنِي عَلِيُّ بْنُ حُجْرٍ السَّعْدِيُّ، أَخْبَرَنَا عَلِيُّ بْنُ مُسْهِرٍ، ح وَحَدَّثَنِي أَبُو سَعِيدٍ، الأَشَجُّ حَدَّثَنَا وَكِيعٌ، جَمِيعًا عَنِ الأَعْمَشِ، بِهَذَا الإِسْنَادِ ‏.‏ نَحْوَ حَدِيثِ أَبِي كُرَيْبٍ عَنْ أَبِي، مُعَاوِيَةَ إِلَى آخِرِهِ وَزَادَ فِي الْحَدِيثِ ‏"‏ فَمَنْ أَخْفَرَ مُسْلِمًا فَعَلَيْهِ لَعْنَةُ اللَّهِ وَالْمَلاَئِكَةِ وَالنَّاسِ أَجْمَعِينَ لاَ يُقْبَلُ مِنْهُ يَوْمَ الْقِيَامَةِ صَرْفٌ وَلاَ عَدْلٌ ‏"‏ ‏.‏ وَلَيْسَ فِي حَدِيثِهِمَا ‏"‏ مَنِ ادَّعَى إِلَى غَيْرِ أَبِيهِ ‏"‏ ‏.‏ وَلَيْسَ فِي رِوَايَةِ وَكِيعٍ ذِكْرُ يَوْمِ الْقِيَامَةِ ‏.‏
Reference : Sahih Muslim 1370 b
In-book reference : Book 15, Hadith 532
USC-MSA web (English) reference : Book 7, Hadith 3164
  (deprecated numbering scheme)