From 1b5609aa4d72fe3e8bd916440844cc380d75d96a Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 9 Feb 2011 14:08:34 +0100 Subject: s3-rpc_server: Fixed possible segfault with client_id. --- source3/rpc_server/rpc_server.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3') diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c index 5be0e5e07d..9a7ff099da 100644 --- a/source3/rpc_server/rpc_server.c +++ b/source3/rpc_server/rpc_server.c @@ -98,6 +98,12 @@ static int make_server_pipes_struct(TALLOC_CTX *mem_ctx, } strlcpy(p->client_id->addr, client_address, sizeof(p->client_id->addr)); + p->client_id->name = talloc_strdup(p->client_id, client_address); + if (p->client_id->name == NULL) { + TALLOC_FREE(p); + *perrno = ENOMEM; + return -1; + } talloc_set_destructor(p, close_internal_rpc_pipe_hnd); -- cgit