Avoid null pointer access in CheckBufferOverrun::runSimplifiedChecks

This commit is contained in:
Alexander Mai 2016-07-09 19:00:59 +02:00
parent ded8d80b23
commit 4eef5642c9
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ public:
void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) { void runSimplifiedChecks(const Tokenizer *tokenizer, const Settings *settings, ErrorLogger *errorLogger) {
CheckBufferOverrun checkBufferOverrun(tokenizer, settings, errorLogger); CheckBufferOverrun checkBufferOverrun(tokenizer, settings, errorLogger);
checkBufferOverrun.checkGlobalAndLocalVariable(); checkBufferOverrun.checkGlobalAndLocalVariable();
if (_tokenizer->isMaxTime()) if (_tokenizer && _tokenizer->isMaxTime())
return; return;
checkBufferOverrun.checkStructVariable(); checkBufferOverrun.checkStructVariable();
checkBufferOverrun.checkBufferAllocatedWithStrlen(); checkBufferOverrun.checkBufferAllocatedWithStrlen();