summaryrefslogtreecommitdiff
path: root/source3/rpc_parse/parse_lsa.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-08-22 02:54:21 +0000
committerAndrew Tridgell <tridge@samba.org>1998-08-22 02:54:21 +0000
commit3f3f47b0bd8d089120d267cfad1976db95cd8ebe (patch)
tree145ed3a2c31999fa352c123b3a366a96ce4dde62 /source3/rpc_parse/parse_lsa.c
parentbce4d95ca9f0f1b175f5eff682c961754d494253 (diff)
downloadsamba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.tar.gz
samba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.tar.bz2
samba-3f3f47b0bd8d089120d267cfad1976db95cd8ebe.zip
added ASSERT() and ASSERT_ARRAY() macros and sprinkled them liberally
in the rpc code. (This used to be commit e6ce1c5b5a9f29d8fcbbd23019186ff5c600e795)
Diffstat (limited to 'source3/rpc_parse/parse_lsa.c')
-rw-r--r--source3/rpc_parse/parse_lsa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index f32ff58efb..272e76eefe 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -82,6 +82,8 @@ void lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
smb_io_unihdr2("", &(r_r->hdr_dom_name), ps, depth); /* domain name unicode string header */
+ ASSERT_ARRAY(r_r->hdr_ref_dom, r_r->num_ref_doms_1-1);
+
for (i = 0; i < r_r->num_ref_doms_1-1; i++)
{
smb_io_unihdr2("", &(r_r->hdr_ref_dom[i]), ps, depth);
@@ -89,6 +91,8 @@ void lsa_io_dom_r_ref(char *desc, DOM_R_REF *r_r, prs_struct *ps, int depth)
smb_io_unistr("", &(r_r->uni_dom_name), ps, depth); /* domain name unicode string */
+ ASSERT_ARRAY(r_r->ref_dom, r_r->num_ref_doms_2);
+
for (i = 0; i < r_r->num_ref_doms_2; i++)
{
smb_io_dom_sid2("", &(r_r->ref_dom[i]), ps, depth); /* referenced domain SIDs */
@@ -413,6 +417,8 @@ void lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth)
prs_uint32("ptr_sid_enum", ps, depth, &(sen->ptr_sid_enum));
prs_uint32("num_entries2", ps, depth, &(sen->num_entries2));
+ ASSERT_ARRAY(sen->ptr_sid, sen->num_entries);
+
for (i = 0; i < sen->num_entries; i++)
{
fstring temp;
@@ -420,6 +426,8 @@ void lsa_io_sid_enum(char *desc, LSA_SID_ENUM *sen, prs_struct *ps, int depth)
prs_uint32(temp, ps, depth, &(sen->ptr_sid[i])); /* domain SID pointers to be looked up. */
}
+ ASSERT_ARRAY(sen->sid, sen->num_entries);
+
for (i = 0; i < sen->num_entries; i++)
{
fstring temp;
@@ -467,6 +475,8 @@ void lsa_io_trans_names(char *desc, LSA_TRANS_NAME_ENUM *trn, prs_struct *ps, in
prs_uint32("ptr_trans_names", ps, depth, &(trn->ptr_trans_names));
prs_uint32("num_entries2 ", ps, depth, &(trn->num_entries2));
+ ASSERT_ARRAY(trn->ptr_name, trn->num_entries);
+
for (i = 0; i < trn->num_entries; i++)
{
fstring temp;
@@ -527,6 +537,8 @@ void lsa_io_q_lookup_rids(char *desc, LSA_Q_LOOKUP_RIDS *q_r, prs_struct *ps, i
prs_uint32("buffer_dom_sid ", ps, depth, &(q_r->buffer_dom_sid)); /* undocumented domain SID buffer pointer */
prs_uint32("buffer_dom_name", ps, depth, &(q_r->buffer_dom_name)); /* undocumented domain name buffer pointer */
+ ASSERT_ARRAY(q_r->lookup_name, q_r->num_entries);
+
for (i = 0; i < q_r->num_entries; i++)
{
smb_io_dom_name("", &(q_r->lookup_name[i]), ps, depth); /* names to be looked up */
@@ -555,6 +567,8 @@ void lsa_io_r_lookup_rids(char *desc, LSA_R_LOOKUP_RIDS *r_r, prs_struct *ps, i
prs_uint32("undoc_buffer", ps, depth, &(r_r->undoc_buffer));
prs_uint32("num_entries2", ps, depth, &(r_r->num_entries2));
+ ASSERT_ARRAY(r_r->dom_rid, r_r->num_entries2);
+
for (i = 0; i < r_r->num_entries2; i++)
{
smb_io_dom_rid2("", &(r_r->dom_rid[i]), ps, depth); /* domain RIDs being looked up */