@@ -1127,6 +1127,13 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
11271127 for (unsigned int i = 1 ; i <= _tokenizer->varIdCount (); i++) {
11281128 const Variable * const var = symbolDatabase->getVariableFromVarId (i);
11291129 if (var && var->isArray () && var->dimension (0 ) > 0 ) {
1130+ _errorLogger->reportProgress (_tokenizer->list .getSourceFilePath (),
1131+ " Check (BufferOverrun::checkGlobalAndLocalVariable 1)" ,
1132+ var->nameToken ()->progressValue ());
1133+
1134+ if (_tokenizer->isMaxTime ())
1135+ return ;
1136+
11301137 const Token *tok = var->nameToken ();
11311138 do {
11321139 if (tok->str () == " {" ) {
@@ -1169,9 +1176,12 @@ void CheckBufferOverrun::checkGlobalAndLocalVariable()
11691176 int nextTok = 0 ;
11701177
11711178 _errorLogger->reportProgress (_tokenizer->list .getSourceFilePath (),
1172- " Check (BufferOverrun::checkGlobalAndLocalVariable)" ,
1179+ " Check (BufferOverrun::checkGlobalAndLocalVariable 2 )" ,
11731180 tok->progressValue ());
11741181
1182+ if (_tokenizer->isMaxTime ())
1183+ return ;
1184+
11751185 if (_tokenizer->isCPP () && Token::Match (tok, " [*;{}] %var% = new %type% [ %num% ]" )) {
11761186 size = MathLib::toLongNumber (tok->strAt (6 ));
11771187 type = tok->strAt (4 );
@@ -1412,6 +1422,8 @@ void CheckBufferOverrun::checkStructVariable()
14121422void CheckBufferOverrun::bufferOverrun ()
14131423{
14141424 checkGlobalAndLocalVariable ();
1425+ if (_tokenizer->isMaxTime ())
1426+ return ;
14151427 checkStructVariable ();
14161428 checkBufferAllocatedWithStrlen ();
14171429 checkStringArgument ();
0 commit comments