Skip to content

Commit 5ae6234

Browse files
committed
Fixed cppcheck-opensource#5978 (false positive: Array 'm_pool_vector[-1]' accessed at index 0, which is out of bounds.)
1 parent 1e5eab8 commit 5ae6234

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/checkbufferoverrun.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,8 +758,8 @@ void CheckBufferOverrun::valueFlowCheckArrayIndex(const Token * const tok, const
758758
totalElements *= arrayInfo.num(ri);
759759
}
760760

761-
// totalElements == 0 => Unknown size
762-
if (totalElements == 0)
761+
// totalElements <= 0 => Unknown size
762+
if (totalElements <= 0)
763763
continue;
764764

765765
// taking address of 1 past end?

0 commit comments

Comments
 (0)