Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

In struct overflow detect

Options
Alexey
Alexey Posts: 1

Hi,

I have simple source:

include <stdio.h>

include <stdint.h>

include <stdlib.h>

typedef struct sss{
uint8_t ss[255];
int *k;
uint8_t ss1[255];
} __sss
;

int main(){
struct __sss *d;
int i;

do {
d = (struct __sss *) malloc(sizeof(struct __sss));
} while (!d);

for( i = 0; i < 257;i++) {
d->ss[i] = 1 + i;
printf("%i\n",d->ss[i]);
}
free(d);
return 0;
}
Check with builtin://Flow Analysis Aggressive.properties not return any errors there. Maybe i need set some option for detect this type of errors?

C/C++ 10.3.4

Best Regards,
Alexey.