diff options
Diffstat (limited to 'source3/lsarpcd/srv_lsa.c')
-rw-r--r-- | source3/lsarpcd/srv_lsa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/lsarpcd/srv_lsa.c b/source3/lsarpcd/srv_lsa.c index da0c11ea7b..d2ca2d7a76 100644 --- a/source3/lsarpcd/srv_lsa.c +++ b/source3/lsarpcd/srv_lsa.c @@ -163,6 +163,8 @@ static void make_reply_lookup_rids(LSA_R_LOOKUP_RIDS *r_l, r_l->undoc_buffer = 1; r_l->num_entries2 = num_entries; + ASSERT_ARRAY(r_l->dom_rid, num_entries); + for (i = 0; i < num_entries; i++) { make_dom_rid2(&(r_l->dom_rid[i]), dom_rids[i]); @@ -182,6 +184,8 @@ static void make_lsa_trans_names(LSA_TRANS_NAME_ENUM *trn, int i; (*total) = 0; + ASSERT(num_entries <= MAX_LOOKUP_SIDS); + for (i = 0; i < num_entries; i++) { uint32 rid = 0xffffffff; @@ -192,6 +196,8 @@ static void make_lsa_trans_names(LSA_TRANS_NAME_ENUM *trn, trn->ptr_name[i] = 0; trn->ptr_name[(*total)] = 0; + ASSERT_ARRAY(sid[i].sid.sub_auths, num_auths); + /* find the rid to look up */ if (num_auths != 0) { @@ -397,6 +403,8 @@ static void api_lsa_lookup_names( int uid, prs_struct *data, string_to_sid(&sid_S_1_3, "S-1-3"); string_to_sid(&sid_S_1_5, "S-1-5"); + ASSERT_ARRAY(q_l.lookup_name, q_l.num_entries); + /* convert received RIDs to strings, so we can do them. */ for (i = 0; i < q_l.num_entries; i++) { |