mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
strncpy can leave the destination unterminated
This commit is contained in:
parent
7e7ad53cbd
commit
9a0676d5c9
@ -2691,7 +2691,7 @@ NTSTATUS rpc_pipe_open_ncalrpc(TALLOC_CTX *mem_ctx, const char *socket_path,
|
||||
|
||||
ZERO_STRUCT(addr);
|
||||
addr.sun_family = AF_UNIX;
|
||||
strncpy(addr.sun_path, socket_path, sizeof(addr.sun_path));
|
||||
strlcpy(addr.sun_path, socket_path, sizeof(addr.sun_path));
|
||||
|
||||
if (sys_connect(fd, (struct sockaddr *)(void *)&addr) == -1) {
|
||||
DEBUG(0, ("connect(%s) failed: %s\n", socket_path,
|
||||
|
Loading…
Reference in New Issue
Block a user