I would like to analyze my program assuming malloc successfully returns an allocated buffer.
When I run the value plugin with the command
/Users/philippeantoine/.opam/4.02.3/bin/frama-c -val testalloc.c
on this simple program :
#include <stdlib.h>
int main (){
char * test = malloc(10);
test[0] = 'a';
}
I get the following output :
[value] computing for function malloc <- main.
Called from testalloc.c:4.
[value] using specification for function malloc
[value] Done for function malloc
testalloc.c:5:[kernel] warning: out of bounds write. assert \valid(test+0);
[value] Recording results for main
[value] done for function main
I would like not to get the "out of bounds write" How can I do that ?
PS : I tried to change the malloc specification in stdlib.h, without success