The analyzer has detected a potential error: an incorrect memory amount is allocated for storing array items.
This error usually occurs if the size of allocated memory is defined by a constant whose value is not multiple of one array item's size. To determine the array size we should use the 'sizeof( T ) * N' expression where 'T' is the type of one array item, 'N' is the number of array items. Incorrect memory allocation may result in array overrun.
Consider an example of incorrect code:
int *p; p = (int *)malloc(70);
In this case 70 bytes will be allocated. Perhaps the programmer needed 80 bytes and just made a misprint.
This is the correct code:
p = (int *)malloc(80);
It may be also that the programmer needed to allocate memory to store 70 items. If this is the case, the fixed code will look like this:
p = (int *)malloc(sizeof(int) * 70);