Fix various potential illegal access and memory leaks in error conditions.

This commit is contained in:
Justin Maggard
2014-04-07 11:20:19 -07:00
parent 6e43ab3c06
commit d492b43ef8
10 changed files with 34 additions and 21 deletions

View File

@ -772,7 +772,7 @@ SubmitServicesToMiniSSDPD(const char *host, unsigned short port)
return -1;
}
addr.sun_family = AF_UNIX;
strncpy(addr.sun_path, minissdpdsocketpath, sizeof(addr.sun_path));
strncpyt(addr.sun_path, minissdpdsocketpath, sizeof(addr.sun_path));
if (connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0)
{
DPRINTF(E_ERROR, L_SSDP, "connect(\"%s\"): %s",