--- winbindd_passdb.c 2008-09-18 08:49:02.000000000 +0200 +++ Pwinbindd_passdb.c 2008-11-16 17:33:06.000000000 +0100 @@ -638,13 +638,13 @@ static NTSTATUS sam_lookup_groupmem(stru sid_type_lookup(lsa_names[i].type))); continue; } - if (!((*names)[i] = talloc_strdup((*names), + if (!((*names)[num_mapped] = talloc_strdup((*names), lsa_names[i].name))) { TALLOC_FREE(tmp_ctx); return NT_STATUS_NO_MEMORY; } - (*name_types)[i] = lsa_names[i].type; + (*name_types)[num_mapped] = lsa_names[i].type; num_mapped += 1; }