From b5521a818fb6b54e5e719fc28e51f402a94f3529 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 21 Sep 2005 00:27:10 +0000 Subject: r10373: Fix segfault in LookupSids. Andrew Bartlett (This used to be commit ddc3a1c79e80e12296c398c42110fc378fb80e00) --- source4/rpc_server/lsa/dcesrv_lsa.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index 2e3f42b272..4222447f01 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -1245,6 +1245,7 @@ static NTSTATUS lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *m r3.in.unknown1 = 0; r3.in.unknown2 = 0; r3.out.count = r->out.count; + r3.out.names = NULL; status = lsa_LookupSids3(dce_call, mem_ctx, &r3); if (dce_call->fault_code != 0) { @@ -1252,6 +1253,11 @@ static NTSTATUS lsa_LookupSids(struct dcesrv_call_state *dce_call, TALLOC_CTX *m } r->out.domains = r3.out.domains; + if (!r3.out.names) { + r->out.names = NULL; + return status; + } + r->out.names = talloc(mem_ctx, struct lsa_TransNameArray); if (r->out.names == NULL) { return NT_STATUS_NO_MEMORY; -- cgit