Reputation: 131
I'm looking for Static Analysis open-source tool for these,
Checking the return value of the function.
foobar = Get_FooBar(...); //this function could return null pointer.
foobar->property = value; //no null check here!
Pointer returned by malloc
.
foobar = (void *)malloc(..);
foobar->property = value; //return value of malloc is not checked.
cppcheck doesn't capture this, AFAIK. Any other open-source/freeware you folks recommend?
Upvotes: 2
Views: 950
Reputation: 622
You can try PVS-Studio it's not free but you can use free trial (without filling any forms) to find memory issues.
Upvotes: 0
Reputation: 300739
List of tools for static code analysis
Static Source Code Analysis Tools for C
Upvotes: 1