CheckBufferOverrun: Fix ctu checking

This commit is contained in:
Daniel Marjamäki 2019-03-23 15:26:13 +01:00
parent 9653760547
commit d27a4ad82e
1 changed files with 2 additions and 1 deletions

View File

@ -668,7 +668,8 @@ bool CheckBufferOverrun::isCtuUnsafeBufferUsage(const Check *check, const Token
/** @brief Parse current TU and extract file info */
Check::FileInfo *CheckBufferOverrun::getFileInfo(const Tokenizer *tokenizer, const Settings *settings) const OVERRIDE
{
const std::list<CTU::FileInfo::UnsafeUsage> &unsafeUsage = CTU::getUnsafeUsage(tokenizer, settings, this, isCtuUnsafeBufferUsage);
CheckBufferOverrun checkBufferOverrun(tokenizer, settings, nullptr);
const std::list<CTU::FileInfo::UnsafeUsage> &unsafeUsage = CTU::getUnsafeUsage(tokenizer, settings, &checkBufferOverrun, isCtuUnsafeBufferUsage);
if (unsafeUsage.empty())
return nullptr;