When lookup_sids() returns NT_STATUS_NONE_MAPPED but exits early without
populating the names array, the subsequent dereference of names causes a
NULL pointer dereference.
Return an appropriate error status that allows existing error handling
to catch this case before the NULL dereference occurs.
Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
if (j == LSA_REF_DOMAIN_LIST_MULTIPLIER) {
/* TODO: What's the right error message here? */
- result = NT_STATUS_NONE_MAPPED;
+ result = NT_STATUS_TOO_MANY_CONTEXT_IDS;
goto fail;
}