mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Copy trailing null byte to keep GCC warnings happy. Closes #1028
This commit is contained in:
@@ -380,7 +380,7 @@ Socket *CreateAbstractServerSocket(uint16_t port, int queuesize)
|
||||
addr.sun_family = AF_UNIX;
|
||||
// first char is '\0'
|
||||
addr.sun_path[0] = '\0';
|
||||
strncpy(addr.sun_path + 1, socketName, socketNameLength);
|
||||
strncpy(addr.sun_path + 1, socketName, socketNameLength + 1);
|
||||
|
||||
int result = bind(s, (sockaddr *)&addr, offsetof(sockaddr_un, sun_path) + 1 + socketNameLength);
|
||||
if(result == -1)
|
||||
|
||||
Reference in New Issue
Block a user