realloc failed: %s\n\n", strerror (errno));
exit (EXIT_FAILURE);
return ptr; /* to eliminate a warning from the compiler */
} else
return p;
}
void *util_Free (void *p)
{
if (p == NULL)
return NULL;
free (p);
return NULL;
}
On Tue, Jan 12, 2016 at
016 12:23, Odzioba, Lukasz a écrit :
> Hi,
> Static analysis tool we use has found quite a lot of potential issues in
> hwloc.
> Most of them are type of "NULL ptr dereference" i.e. when pointer is not
> checked for null after allocation, but there are some more interest
On Friday, July 17, 2015 2:30 PM Brice Goglin wrote:
>Thanks, I'll fix this. I'll try strlcpy() in case it's widely available
>enough. Otherwise I'll just add the ending \0 manually.
Sounds good, thank you for fast response.
Lukas
Hi,
Static analysis detected inappropriate use of strcpy function[1] in
topology-linux.c.
There are more places like this, but here data comes from dev configuration
file and I think we should fix it in the first place.
Below is the patch which fixes those which concern me.
Unfortunately