From d6d67d90119ced0af3b45677a15d428ed349407c Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Mon, 3 Sep 2012 20:54:33 +1000 Subject: [PATCH] configure: Fix infinite loop displaying config.summary Displaying config.summary sometimes results in an infinite loop because the loop condition only checks that failbit and badbit are not set. The eofbit may be set with failbit and badbit not set. Change-Id: I209480fbf114365fd4fdf1289c988a386f9f2562 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 7fc1c6246aa..226214db437 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3382,7 +3382,7 @@ void Configure::displayConfig() // display config.summary sout.seekg(0, ios::beg); - while (sout) { + while (sout.good()) { string str; getline(sout, str); cout << str << endl;