From c57da5d796f8bc284643679bcd8ece05394becad Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 19 Sep 2007 12:03:02 +0000 Subject: r25224: Fix a potential segfault in lsa_lookupsids client code due to uninitialized data. Michael (This used to be commit b4fff6d09d17a18eae61e8ca789f128cd094ba09) --- source3/rpc_client/cli_lsarpc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source3/rpc_client') diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c index 1f0677ee03..bb1b67ce1a 100644 --- a/source3/rpc_client/cli_lsarpc.c +++ b/source3/rpc_client/cli_lsarpc.c @@ -172,6 +172,7 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli, NT_STATUS_UNSUCCESSFUL ); if (!NT_STATUS_IS_OK(r.status) && + !NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) && !NT_STATUS_EQUAL(r.status, STATUS_SOME_UNMAPPED)) { /* An actual error occured */ @@ -181,7 +182,9 @@ static NTSTATUS rpccli_lsa_lookup_sids_noalloc(struct rpc_pipe_client *cli, /* Return output parameters */ - if (r.mapped_count == 0) { + if (NT_STATUS_EQUAL(r.status, NT_STATUS_NONE_MAPPED) || + (r.mapped_count == 0)) + { for (i = 0; i < num_sids; i++) { (names)[i] = NULL; (domains)[i] = NULL; -- cgit