كتاب الفتن وأشراط الساعة
54  
The Book of Tribulations and Portents of the Last Hour
(18)
Chapter: The Hour Will Not Begin Until A Man Passes By Another Man's Grave And Wishes That He Was In The Place Of The Deceased, Because Of Calamity
(18)
بَاب لَا تَقُومُ السَّاعَةُ حَتَّى يَمُرَّ الرَّجُلُ بِقَبْرِ الرَّجُلِ فَيَتَمَنَّى أَنْ يَكُونَ مَكَانَ الْمَيِّتِ مِنْ الْبَلَاءِ
Sahih Muslim 2913/2914 b

This hadith has been narrated on the authority of Abu Sa'id through another chain of transmitters.

وَحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنْ دَاوُدَ بْنِ أَبِي هِنْدٍ، عَنْ أَبِي، نَضْرَةَ عَنْ أَبِي سَعِيدٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم بِمِثْلِهِ ‏.‏
Reference : Sahih Muslim 2913/2914b
In-book reference : Book 54, Hadith 85
USC-MSA web (English) reference : Book 41, Hadith 6965
  (deprecated numbering scheme)