Fixed #5978 (false positive: Array 'm_pool_vector[-1]' accessed at index 0, which is out of bounds.)
This commit is contained in:
parent
1e5eab8f17
commit
5ae6234729
|
@ -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?
|
||||||
|
|
Loading…
Reference in New Issue