mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-13 09:31:00 +00:00
fix potential unterminated string
This commit is contained in:
parent
86af4da784
commit
b76089f0cd
1 changed files with 1 additions and 1 deletions
|
@ -363,7 +363,7 @@ static NSMapTable *portToNamesMap;
|
||||||
|
|
||||||
memset(&sockAddr, '\0', sizeof(sockAddr));
|
memset(&sockAddr, '\0', sizeof(sockAddr));
|
||||||
sockAddr.sun_family = AF_LOCAL;
|
sockAddr.sun_family = AF_LOCAL;
|
||||||
strncpy(sockAddr.sun_path, socket_path, sizeof(sockAddr.sun_path));
|
strncpy(sockAddr.sun_path, socket_path, sizeof(sockAddr.sun_path) - 1);
|
||||||
|
|
||||||
if ((desc = socket(PF_LOCAL, SOCK_STREAM, PF_UNSPEC)) < 0)
|
if ((desc = socket(PF_LOCAL, SOCK_STREAM, PF_UNSPEC)) < 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue