Sahih Muslim Book 3, Hadith Number 658.
Chapter : The woman who has a prolonged flow of blood, her bathing and prayer.
On the authority of ‘Aisha: Umm Habiba asked the Messenger of Allah (may peace be upon him) about the blood (which flows beyond the period of menstruation). ‘Aisha said: I saw her wash-tub full of blood. The Messenger of Allah (may peace be upon him) said: Remain away (from prayer) equal (to the length of time) that your menses prevented you. After this (after the period of usual courses) bathe yourself and offer prayer.