From 829f6489daf357bb5d63a89d1f808d3d72e43263 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 26 Jul 2013 15:11:57 +0200 Subject: [PATCH] avoid infinite loop on unterminated bracketed expressions Change-Id: I9469608e1b9ce1d345c4011982b19814ebd39b53 Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- src/linguist/lupdate/cpp.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/linguist/lupdate/cpp.cpp b/src/linguist/lupdate/cpp.cpp index 7418689..b6222e6 100644 --- a/src/linguist/lupdate/cpp.cpp +++ b/src/linguist/lupdate/cpp.cpp @@ -1616,8 +1616,10 @@ void CppParser::parseInternal(ConversionData &cd, const QStringList &includeStac // so they don't confuse our scoping of static initializers. // we enter the loop by either reading a left bracket or by an // #else popping the state. - while (yyBracketDepth) + if (yyBracketDepth) { yyTok = getToken(); + continue; + } //qDebug() << "TOKEN: " << yyTok; switch (yyTok) { case Tok_QuotedInclude: { -- 2.7.4