From: Oswald Buddenhagen Date: Fri, 26 Jul 2013 13:11:57 +0000 (+0200) Subject: avoid infinite loop on unterminated bracketed expressions X-Git-Tag: accepted/tizen/20131212.181521~89^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=829f6489daf357bb5d63a89d1f808d3d72e43263;p=platform%2Fupstream%2Fqttools.git avoid infinite loop on unterminated bracketed expressions Change-Id: I9469608e1b9ce1d345c4011982b19814ebd39b53 Reviewed-by: hjk Reviewed-by: Oswald Buddenhagen --- 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: {