summaryrefslogtreecommitdiff
path: root/source3/rpc_server/rpc_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/rpc_server.c')
-rw-r--r--source3/rpc_server/rpc_server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/rpc_server.c b/source3/rpc_server/rpc_server.c
index 4cab4f1521..db11bc1d1c 100644
--- a/source3/rpc_server/rpc_server.c
+++ b/source3/rpc_server/rpc_server.c
@@ -1012,10 +1012,12 @@ static void dcerpc_ncalrpc_listener(struct tevent_context *ev,
struct tsocket_address *cli_addr = NULL;
struct sockaddr_un sunaddr;
struct sockaddr *addr = (struct sockaddr *)(void *)&sunaddr;
- socklen_t len;
+ socklen_t len = sizeof(sunaddr);
int sd = -1;
int rc;
+ ZERO_STRUCT(sunaddr);
+
while (sd == -1) {
sd = accept(state->fd, addr, &len);
if (sd == -1 && errno != EINTR) {