diff options
-rw-r--r-- | source3/rpc_server/srv_samr_nt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c index a19be4ed7f..127a0cbbff 100644 --- a/source3/rpc_server/srv_samr_nt.c +++ b/source3/rpc_server/srv_samr_nt.c @@ -1795,7 +1795,11 @@ NTSTATUS _samr_LookupNames(struct pipes_struct *p, rids.ids = rid; types.count = num_rids; - types.ids = (uint32_t *) type; + types.ids = talloc_array(p->mem_ctx, uint32_t, num_rids); + NT_STATUS_HAVE_NO_MEMORY(type); + for (i = 0; i < num_rids; i++) { + types.ids[i] = (type[i] & 0xffffffff); + } *r->out.rids = rids; *r->out.types = types; |