Fixed #5978 (false positive: Array 'm_pool_vector[-1]' accessed at index 0, which is out of bounds.)

This commit is contained in:
Daniel Marjamäki 2014-07-20 11:44:25 +02:00
parent 1e5eab8f17
commit 5ae6234729
1 changed files with 2 additions and 2 deletions

View File

@ -758,8 +758,8 @@ void CheckBufferOverrun::valueFlowCheckArrayIndex(const Token * const tok, const
totalElements *= arrayInfo.num(ri); totalElements *= arrayInfo.num(ri);
} }
// totalElements == 0 => Unknown size // totalElements <= 0 => Unknown size
if (totalElements == 0) if (totalElements <= 0)
continue; continue;
// taking address of 1 past end? // taking address of 1 past end?