diff options
author | Michael Adam <obnox@samba.org> | 2007-09-19 12:03:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:51 -0500 |
commit | c57da5d796f8bc284643679bcd8ece05394becad (patch) | |
tree | 1a92769b3e62bc6e1bf9466e72eb30b8a2c08530 | |
parent | 5bf76929976f17aeca7853767ce4f8359acc3166 (diff) | |
download | samba-c57da5d796f8bc284643679bcd8ece05394becad.tar.gz samba-c57da5d796f8bc284643679bcd8ece05394becad.tar.bz2 samba-c57da5d796f8bc284643679bcd8ece05394becad.zip |
r25224: Fix a potential segfault in lsa_lookupsids client code due to
uninitialized data.
Michael
(This used to be commit b4fff6d09d17a18eae61e8ca789f128cd094ba09)
-rw-r--r-- | source3/rpc_client/cli_lsarpc.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |