Ticket #1548 (closed defect: fixed)
False positive: array index out of bounds in for-loop
| Reported by: | hyd_danmar | Owned by: | aggro80 |
|---|---|---|---|
| Priority: | Milestone: | 1.43 | |
| Component: | False positive | Keywords: | |
| Cc: |
Description
Example code:
void foo()
{
char val[5];
for (unsigned int i = 3; i < 5; --i)
val[i+1] = val[i];
}
False positive:
[a.cpp:5]: (error) Array 'val[5]' index 5 out of bounds
Change History
Note: See
TracTickets for help on using
tickets.