This should fix Coverity CID 310986:
Null pointer dereferences (FORWARD_NULL)
Passing null pointer "func" to "strncmp", which dereferences it.
printf("%s", func);
printf(" (%d)", profile_func_level);
/* Print the "from" part except for the main function) */
- if (action == ENTER && strncmp(func, "main", sizeof("main"))) {
+ if (action == ENTER && func != NULL &&
+ strncmp(func, "main", sizeof("main"))) {
/* Calling function */
if ((bfd_vma)call_site < vma) {
printf("[ERROR address call_site]");