From 9398fa810b422234954f2e2e282a6993b98f21c3 Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Wed, 25 Mar 2015 10:39:09 +0300 Subject: [PATCH] Avoid value truncation --- lib/checkbufferoverrun.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index b176709ca..8e766707e 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -1736,7 +1736,7 @@ Check::FileInfo* CheckBufferOverrun::getFileInfo(const Tokenizer *tokenizer, con tok->next()->astOperand2()) { const ValueFlow::Value *value = tok->next()->astOperand2()->getMaxValue(false); if (value && value->intvalue > 0) { - const int arrayIndex = value->intvalue; + const MathLib::bigint arrayIndex = value->intvalue; std::map::iterator it = fileInfo->arrayUsage.find(tok->str()); if (it != fileInfo->arrayUsage.end() && it->second.index >= arrayIndex) continue;