From deef4642d41cab130427e4b4e83d80cf4f623894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 29 Mar 2014 20:22:35 +0100 Subject: [PATCH] Buffer overrun: removed some old code that is not based on valueflow --- lib/checkbufferoverrun.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/checkbufferoverrun.cpp b/lib/checkbufferoverrun.cpp index a51c5adf1..c9eaa8e8e 100644 --- a/lib/checkbufferoverrun.cpp +++ b/lib/checkbufferoverrun.cpp @@ -971,17 +971,6 @@ void CheckBufferOverrun::checkScope(const Token *tok, const std::vector 0 && Token::Match(tok, "%varid% [ %num% ]", declarationId)) || - (declarationId == 0 && Token::Match(tok, (varnames + " [ %num% ]").c_str()))) { - const MathLib::bigint index = MathLib::toLongNumber(tok->strAt(2 + varc)); - if (index >= size) { - std::vector indexes; - indexes.push_back(index); - arrayIndexOutOfBoundsError(tok->tokAt(varc), arrayInfo, indexes); - } - } - // If the result of pointer arithmetic means that the pointer is // out of bounds then this flag will be set. bool pointerIsOutOfBounds = false;