Author: abartlet
Date: 2005-09-21 00:27:10 +0000 (Wed, 21 Sep 2005)
New Revision: 10373

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10373

Log:
Fix segfault in LookupSids.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c


Changeset:
Modified: branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c       2005-09-21 
00:15:56 UTC (rev 10372)
+++ branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c       2005-09-21 
00:27:10 UTC (rev 10373)
@@ -1245,6 +1245,7 @@
        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 @@
        }
 
        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;

Reply via email to