This is a summary, rather than a quote from the book.
While sleeping with his head resting on a weirwood stump, Jaime dreams that he is at home, in the Rock, and that he has both his hands. Then he sees that he is surrounded by a dozen tall figures in robes that hide their faces and with spears in their hands. They drive him down deep into the Rock, and there he sees Tywin and Cersei and Joffrey. When he wonders what place this is, he is told "Your place." by an echoing voice, the voice of all the Lannisters since Lann the Clever, and the others turn to leave, although he begs them not to leave him alone in the dark. Then Brienne appears, naked and in chains, and begs him to cut the chains, which he does. Then he hears Cersei call that "The flames will burn so long as you live," and "When they die, so must you.". After she leaves, six riders come nearer. Oswell Whent, Jon Darry, Lewyn Martell, Gerold Hightower, Arthur Dayne and Rhaegar Targaryen. Brienne says she swore an oath to keep him safe, and Arthur Dayne replies that "We all swore oaths,". Then the other Kingsguard accuse him of failing his duty, and Rhaegar tells him he had trusted him to keep his wife and children safe, and then the flames start going out until only Brienne's sword is burning and the ghosts are rushing towards him. He screams, and wakes up.
Whether this actually means something, instead of being a representation of Jaime's beginning transformation as a person and re-examining of his past, is hard to say. It could imply some kind of danger to his life which only Brienne can save him from, however. Some feel that Brienne mentioning a bear as a possible danger, and the fact that Jaime's head is on the stump of a weirwood, may strengthen the possibility that the dream is prophetic.