summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/wb_lookupsids.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd/wb_lookupsids.c')
-rw-r--r--source3/winbindd/wb_lookupsids.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c
index 2c4ebda3eb..e10d511493 100644
--- a/source3/winbindd/wb_lookupsids.c
+++ b/source3/winbindd/wb_lookupsids.c
@@ -402,6 +402,9 @@ static bool wb_lookupsids_move_name(struct lsa_RefDomainList *src_domains,
uint32_t src_domain_index, dst_domain_index;
src_domain_index = src_name->sid_index;
+ if (src_domain_index >= src_domains->count) {
+ return false;
+ }
src_domain = &src_domains->domains[src_domain_index];
if (!wb_lookupsids_find_dom_idx(