summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-04-22 09:34:35 +0200
committerVolker Lendecke <vl@samba.org>2011-04-22 10:06:34 +0200
commit9a0676d5c947033ac41f700be9ba92ab1666814e (patch)
tree69411861fecfdb096958eaa067fd83219d336d45 /source3/rpc_client
parent7e7ad53cbd77ce2201fd46bd2c08a601725f9f5b (diff)
downloadsamba-9a0676d5c947033ac41f700be9ba92ab1666814e.tar.gz
samba-9a0676d5c947033ac41f700be9ba92ab1666814e.tar.bz2
samba-9a0676d5c947033ac41f700be9ba92ab1666814e.zip
s3: Fix Coverity ID 986, BUFFER_SIZE_WARNING
strncpy can leave the destination unterminated
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_pipe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c
index 02103e16f3..d7f990af2c 100644
--- a/source3/rpc_client/cli_pipe.c
+++ b/source3/rpc_client/cli_pipe.c
@@ -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,