diff options
author | Andreas Schneider <asn@samba.org> | 2012-12-10 17:07:24 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2012-12-12 15:00:02 +0100 |
commit | 07385a851f6c07c9f8ef4414d8483de7106ee486 (patch) | |
tree | ccebcd6d7e2a74a43242977494bfffe9d8e564c4 /source3/lib | |
parent | ef0a945bf8e6310acb41f90a2179e61d412a61ea (diff) | |
download | samba-07385a851f6c07c9f8ef4414d8483de7106ee486.tar.gz samba-07385a851f6c07c9f8ef4414d8483de7106ee486.tar.bz2 samba-07385a851f6c07c9f8ef4414d8483de7106ee486.zip |
s3-ctdb: Make sure addr.sun_path is null terminated.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/ctdbd_conn.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c index 84f26e00d3..5417c67268 100644 --- a/source3/lib/ctdbd_conn.c +++ b/source3/lib/ctdbd_conn.c @@ -213,7 +213,7 @@ static NTSTATUS ctdbd_connect(TALLOC_CTX *mem_ctx, ZERO_STRUCT(addr); addr.sun_family = AF_UNIX; - strncpy(addr.sun_path, sockname, sizeof(addr.sun_path)); + snprintf(addr.sun_path, sizeof(addr.sun_path), "%s", sockname); salen = sizeof(struct sockaddr_un); if (connect(fd, (struct sockaddr *)(void *)&addr, salen) == -1) { |