summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_ncacn_np_internal.c
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2010-06-07 15:07:38 -0400
committerSimo Sorce <ssorce@redhat.com>2010-06-07 17:25:47 -0400
commitf7e2e8370bfa91ad8dbd9de4f69bf1cfe0947573 (patch)
treebf5334ee530f8db5b266ada39efc9c1140498dd6 /source3/rpc_server/rpc_ncacn_np_internal.c
parent711a30aa61bb5f6a9b3970007bad8a70f411fb87 (diff)
downloadsamba-f7e2e8370bfa91ad8dbd9de4f69bf1cfe0947573.tar.gz
samba-f7e2e8370bfa91ad8dbd9de4f69bf1cfe0947573.tar.bz2
samba-f7e2e8370bfa91ad8dbd9de4f69bf1cfe0947573.zip
s3:rpc fix potential out of bound memory access
memcpy copies memory unconditionally, we are passing "" in some cases here. Use strncpy which will stop reading from src if the null byte is found and will fill with nulls the destination.
Diffstat (limited to 'source3/rpc_server/rpc_ncacn_np_internal.c')
-rw-r--r--source3/rpc_server/rpc_ncacn_np_internal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c b/source3/rpc_server/rpc_ncacn_np_internal.c
index 6002489bd9..f5a3737844 100644
--- a/source3/rpc_server/rpc_ncacn_np_internal.c
+++ b/source3/rpc_server/rpc_ncacn_np_internal.c
@@ -159,7 +159,7 @@ struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx,
DLIST_ADD(InternalPipes, p);
- memcpy(p->client_address, client_address, sizeof(p->client_address));
+ strlcpy(p->client_address, client_address, sizeof(p->client_address));
p->endian = RPC_LITTLE_ENDIAN;