summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr/ndr_samr.c
diff options
context:
space:
mode:
Diffstat (limited to 'librpc/gen_ndr/ndr_samr.c')
-rw-r--r--librpc/gen_ndr/ndr_samr.c182
1 files changed, 120 insertions, 62 deletions
diff --git a/librpc/gen_ndr/ndr_samr.c b/librpc/gen_ndr/ndr_samr.c
index ab76f5af281..2b93a89444f 100644
--- a/librpc/gen_ndr/ndr_samr.c
+++ b/librpc/gen_ndr/ndr_samr.c
@@ -302,6 +302,7 @@ static enum ndr_err_code ndr_push_samr_SamArray(struct ndr_push *ndr, int ndr_fl
static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_flags, struct samr_SamArray *r)
{
uint32_t _ptr_entries;
+ uint32_t size_entries_1 = 0;
uint32_t cntr_entries_1;
TALLOC_CTX *_mem_save_entries_0;
TALLOC_CTX *_mem_save_entries_1;
@@ -320,13 +321,14 @@ static enum ndr_err_code ndr_pull_samr_SamArray(struct ndr_pull *ndr, int ndr_fl
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
- NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
+ size_entries_1 = ndr_get_array_size(ndr, &r->entries);
+ NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
_mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
}
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_SamEntry(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
@@ -1185,6 +1187,7 @@ static enum ndr_err_code ndr_push_samr_Ids(struct ndr_push *ndr, int ndr_flags,
static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags, struct samr_Ids *r)
{
uint32_t _ptr_ids;
+ uint32_t size_ids_1 = 0;
uint32_t cntr_ids_1;
TALLOC_CTX *_mem_save_ids_0;
TALLOC_CTX *_mem_save_ids_1;
@@ -1206,10 +1209,11 @@ static enum ndr_err_code ndr_pull_samr_Ids(struct ndr_pull *ndr, int ndr_flags,
_mem_save_ids_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->ids));
- NDR_PULL_ALLOC_N(ndr, r->ids, ndr_get_array_size(ndr, &r->ids));
+ size_ids_1 = ndr_get_array_size(ndr, &r->ids);
+ NDR_PULL_ALLOC_N(ndr, r->ids, size_ids_1);
_mem_save_ids_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->ids, 0);
- for (cntr_ids_1 = 0; cntr_ids_1 < r->count; cntr_ids_1++) {
+ for (cntr_ids_1 = 0; cntr_ids_1 < size_ids_1; cntr_ids_1++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ids[cntr_ids_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ids_1, 0);
@@ -1558,10 +1562,12 @@ static enum ndr_err_code ndr_push_samr_RidTypeArray(struct ndr_push *ndr, int nd
static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidTypeArray *r)
{
uint32_t _ptr_rids;
+ uint32_t size_rids_1 = 0;
uint32_t cntr_rids_1;
TALLOC_CTX *_mem_save_rids_0;
TALLOC_CTX *_mem_save_rids_1;
uint32_t _ptr_types;
+ uint32_t size_types_1 = 0;
uint32_t cntr_types_1;
TALLOC_CTX *_mem_save_types_0;
TALLOC_CTX *_mem_save_types_1;
@@ -1586,10 +1592,11 @@ static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int nd
_mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
- NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
+ size_rids_1 = ndr_get_array_size(ndr, &r->rids);
+ NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
_mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
- for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
+ for (cntr_rids_1 = 0; cntr_rids_1 < size_rids_1; cntr_rids_1++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
@@ -1599,10 +1606,11 @@ static enum ndr_err_code ndr_pull_samr_RidTypeArray(struct ndr_pull *ndr, int nd
_mem_save_types_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->types));
- NDR_PULL_ALLOC_N(ndr, r->types, ndr_get_array_size(ndr, &r->types));
+ size_types_1 = ndr_get_array_size(ndr, &r->types);
+ NDR_PULL_ALLOC_N(ndr, r->types, size_types_1);
_mem_save_types_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->types, 0);
- for (cntr_types_1 = 0; cntr_types_1 < r->count; cntr_types_1++) {
+ for (cntr_types_1 = 0; cntr_types_1 < size_types_1; cntr_types_1++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->types[cntr_types_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_types_1, 0);
@@ -1958,6 +1966,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_LogonHours(struct ndr_push *ndr, int nd
_PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int ndr_flags, struct samr_LogonHours *r)
{
uint32_t _ptr_bits;
+ uint32_t size_bits_1 = 0;
+ uint32_t length_bits_1 = 0;
TALLOC_CTX *_mem_save_bits_0;
{
uint32_t _flags_save_STRUCT = ndr->flags;
@@ -1978,11 +1988,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_LogonHours(struct ndr_pull *ndr, int nd
NDR_PULL_SET_MEM_CTX(ndr, r->bits, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->bits));
NDR_CHECK(ndr_pull_array_length(ndr, &r->bits));
- if (ndr_get_array_length(ndr, &r->bits) > ndr_get_array_size(ndr, &r->bits)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->bits), ndr_get_array_length(ndr, &r->bits));
+ size_bits_1 = ndr_get_array_size(ndr, &r->bits);
+ length_bits_1 = ndr_get_array_length(ndr, &r->bits);
+ if (length_bits_1 > size_bits_1) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_bits_1, length_bits_1);
}
- NDR_PULL_ALLOC_N(ndr, r->bits, ndr_get_array_size(ndr, &r->bits));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, ndr_get_array_length(ndr, &r->bits)));
+ NDR_PULL_ALLOC_N(ndr, r->bits, size_bits_1);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->bits, length_bits_1));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bits_0, 0);
}
if (r->bits) {
@@ -2618,12 +2630,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_Password(struct ndr_push *ndr, int ndr_
_PUBLIC_ enum ndr_err_code ndr_pull_samr_Password(struct ndr_pull *ndr, int ndr_flags, struct samr_Password *r)
{
+ uint32_t size_hash_0 = 0;
{
uint32_t _flags_save_STRUCT = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, 16));
+ size_hash_0 = 16;
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->hash, size_hash_0));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -2835,6 +2849,7 @@ static enum ndr_err_code ndr_push_samr_UserInfo21(struct ndr_push *ndr, int ndr_
static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_flags, struct samr_UserInfo21 *r)
{
uint32_t _ptr_buffer;
+ uint32_t size_buffer_1 = 0;
TALLOC_CTX *_mem_save_buffer_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -2896,8 +2911,9 @@ static enum ndr_err_code ndr_pull_samr_UserInfo21(struct ndr_pull *ndr, int ndr_
_mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->buffer, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->buffer));
- NDR_PULL_ALLOC_N(ndr, r->buffer, ndr_get_array_size(ndr, &r->buffer));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, ndr_get_array_size(ndr, &r->buffer)));
+ size_buffer_1 = ndr_get_array_size(ndr, &r->buffer);
+ NDR_PULL_ALLOC_N(ndr, r->buffer, size_buffer_1);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->buffer, size_buffer_1));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
}
NDR_CHECK(ndr_pull_samr_LogonHours(ndr, NDR_BUFFERS, &r->logon_hours));
@@ -2972,12 +2988,14 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_CryptPassword(struct ndr_push *ndr, int
_PUBLIC_ enum ndr_err_code ndr_pull_samr_CryptPassword(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPassword *r)
{
+ uint32_t size_data_0 = 0;
{
uint32_t _flags_save_STRUCT = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 516));
+ size_data_0 = 516;
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -3085,12 +3103,14 @@ static enum ndr_err_code ndr_push_samr_CryptPasswordEx(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_samr_CryptPasswordEx(struct ndr_pull *ndr, int ndr_flags, struct samr_CryptPasswordEx *r)
{
+ uint32_t size_data_0 = 0;
{
uint32_t _flags_save_STRUCT = ndr->flags;
ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 1));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, 532));
+ size_data_0 = 532;
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_0));
}
if (ndr_flags & NDR_BUFFERS) {
}
@@ -3738,6 +3758,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_RidWithAttributeArray(struct ndr_push *
_PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *ndr, int ndr_flags, struct samr_RidWithAttributeArray *r)
{
uint32_t _ptr_rids;
+ uint32_t size_rids_1 = 0;
uint32_t cntr_rids_1;
TALLOC_CTX *_mem_save_rids_0;
TALLOC_CTX *_mem_save_rids_1;
@@ -3756,10 +3777,11 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_RidWithAttributeArray(struct ndr_pull *
_mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->rids));
- NDR_PULL_ALLOC_N(ndr, r->rids, ndr_get_array_size(ndr, &r->rids));
+ size_rids_1 = ndr_get_array_size(ndr, &r->rids);
+ NDR_PULL_ALLOC_N(ndr, r->rids, size_rids_1);
_mem_save_rids_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->rids, 0);
- for (cntr_rids_1 = 0; cntr_rids_1 < r->count; cntr_rids_1++) {
+ for (cntr_rids_1 = 0; cntr_rids_1 < size_rids_1; cntr_rids_1++) {
NDR_CHECK(ndr_pull_samr_RidWithAttribute(ndr, NDR_SCALARS, &r->rids[cntr_rids_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_1, 0);
@@ -3872,6 +3894,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoGeneral(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoGeneral *r)
{
uint32_t _ptr_entries;
+ uint32_t size_entries_1 = 0;
uint32_t cntr_entries_1;
TALLOC_CTX *_mem_save_entries_0;
TALLOC_CTX *_mem_save_entries_1;
@@ -3890,13 +3913,14 @@ static enum ndr_err_code ndr_pull_samr_DispInfoGeneral(struct ndr_pull *ndr, int
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
- NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
+ size_entries_1 = ndr_get_array_size(ndr, &r->entries);
+ NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
_mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
}
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryGeneral(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
@@ -4004,6 +4028,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoFull(struct ndr_push *ndr, int nd
static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFull *r)
{
uint32_t _ptr_entries;
+ uint32_t size_entries_1 = 0;
uint32_t cntr_entries_1;
TALLOC_CTX *_mem_save_entries_0;
TALLOC_CTX *_mem_save_entries_1;
@@ -4022,13 +4047,14 @@ static enum ndr_err_code ndr_pull_samr_DispInfoFull(struct ndr_pull *ndr, int nd
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
- NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
+ size_entries_1 = ndr_get_array_size(ndr, &r->entries);
+ NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
_mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
}
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryFull(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
@@ -4136,6 +4162,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoFullGroups(struct ndr_push *ndr,
static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoFullGroups *r)
{
uint32_t _ptr_entries;
+ uint32_t size_entries_1 = 0;
uint32_t cntr_entries_1;
TALLOC_CTX *_mem_save_entries_0;
TALLOC_CTX *_mem_save_entries_1;
@@ -4154,13 +4181,14 @@ static enum ndr_err_code ndr_pull_samr_DispInfoFullGroups(struct ndr_pull *ndr,
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
- NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
+ size_entries_1 = ndr_get_array_size(ndr, &r->entries);
+ NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
_mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
}
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryFullGroup(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
@@ -4257,6 +4285,7 @@ static enum ndr_err_code ndr_push_samr_DispInfoAscii(struct ndr_push *ndr, int n
static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int ndr_flags, struct samr_DispInfoAscii *r)
{
uint32_t _ptr_entries;
+ uint32_t size_entries_1 = 0;
uint32_t cntr_entries_1;
TALLOC_CTX *_mem_save_entries_0;
TALLOC_CTX *_mem_save_entries_1;
@@ -4275,13 +4304,14 @@ static enum ndr_err_code ndr_pull_samr_DispInfoAscii(struct ndr_pull *ndr, int n
_mem_save_entries_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->entries));
- NDR_PULL_ALLOC_N(ndr, r->entries, ndr_get_array_size(ndr, &r->entries));
+ size_entries_1 = ndr_get_array_size(ndr, &r->entries);
+ NDR_PULL_ALLOC_N(ndr, r->entries, size_entries_1);
_mem_save_entries_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->entries, 0);
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_SCALARS, &r->entries[cntr_entries_1]));
}
- for (cntr_entries_1 = 0; cntr_entries_1 < r->count; cntr_entries_1++) {
+ for (cntr_entries_1 = 0; cntr_entries_1 < size_entries_1; cntr_entries_1++) {
NDR_CHECK(ndr_pull_samr_DispEntryAscii(ndr, NDR_BUFFERS, &r->entries[cntr_entries_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entries_1, 0);
@@ -4778,6 +4808,7 @@ static enum ndr_err_code ndr_push_samr_ValidationBlob(struct ndr_push *ndr, int
static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidationBlob *r)
{
uint32_t _ptr_data;
+ uint32_t size_data_1 = 0;
TALLOC_CTX *_mem_save_data_0;
if (ndr_flags & NDR_SCALARS) {
NDR_CHECK(ndr_pull_align(ndr, 4));
@@ -4794,8 +4825,9 @@ static enum ndr_err_code ndr_pull_samr_ValidationBlob(struct ndr_pull *ndr, int
_mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
- NDR_PULL_ALLOC_N(ndr, r->data, ndr_get_array_size(ndr, &r->data));
- NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, ndr_get_array_size(ndr, &r->data)));
+ size_data_1 = ndr_get_array_size(ndr, &r->data);
+ NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
+ NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, size_data_1));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
}
if (r->data) {
@@ -4849,6 +4881,7 @@ static enum ndr_err_code ndr_push_samr_ValidatePasswordInfo(struct ndr_push *ndr
static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr, int ndr_flags, struct samr_ValidatePasswordInfo *r)
{
uint32_t _ptr_pwd_history;
+ uint32_t size_pwd_history_1 = 0;
uint32_t cntr_pwd_history_1;
TALLOC_CTX *_mem_save_pwd_history_0;
TALLOC_CTX *_mem_save_pwd_history_1;
@@ -4872,13 +4905,14 @@ static enum ndr_err_code ndr_pull_samr_ValidatePasswordInfo(struct ndr_pull *ndr
_mem_save_pwd_history_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->pwd_history));
- NDR_PULL_ALLOC_N(ndr, r->pwd_history, ndr_get_array_size(ndr, &r->pwd_history));
+ size_pwd_history_1 = ndr_get_array_size(ndr, &r->pwd_history);
+ NDR_PULL_ALLOC_N(ndr, r->pwd_history, size_pwd_history_1);
_mem_save_pwd_history_1 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->pwd_history, 0);
- for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
+ for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < size_pwd_history_1; cntr_pwd_history_1++) {
NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_SCALARS, &r->pwd_history[cntr_pwd_history_1]));
}
- for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < r->pwd_history_len; cntr_pwd_history_1++) {
+ for (cntr_pwd_history_1 = 0; cntr_pwd_history_1 < size_pwd_history_1; cntr_pwd_history_1++) {
NDR_CHECK(ndr_pull_samr_ValidationBlob(ndr, NDR_BUFFERS, &r->pwd_history[cntr_pwd_history_1]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pwd_history_1, 0);
@@ -7195,6 +7229,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_LookupNames(struct ndr_push *ndr, int f
_PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int flags, struct samr_LookupNames *r)
{
+ uint32_t size_names_0 = 0;
+ uint32_t length_names_0 = 0;
uint32_t cntr_names_0;
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_names_0;
@@ -7216,16 +7252,18 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_LookupNames(struct ndr_pull *ndr, int f
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.names));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.names));
- if (ndr_get_array_length(ndr, &r->in.names) > ndr_get_array_size(ndr, &r->in.names)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.names), ndr_get_array_length(ndr, &r->in.names));
+ size_names_0 = ndr_get_array_size(ndr, &r->in.names);
+ length_names_0 = ndr_get_array_length(ndr, &r->in.names);
+ if (length_names_0 > size_names_0) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_names_0, length_names_0);
}
- NDR_PULL_ALLOC_N(ndr, r->in.names, ndr_get_array_size(ndr, &r->in.names));
+ NDR_PULL_ALLOC_N(ndr, r->in.names, size_names_0);
_mem_save_names_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.names, 0);
- for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ for (cntr_names_0 = 0; cntr_names_0 < length_names_0; cntr_names_0++) {
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS, &r->in.names[cntr_names_0]));
}
- for (cntr_names_0 = 0; cntr_names_0 < r->in.num_names; cntr_names_0++) {
+ for (cntr_names_0 = 0; cntr_names_0 < length_names_0; cntr_names_0++) {
NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_BUFFERS, &r->in.names[cntr_names_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_names_0, 0);
@@ -7337,6 +7375,8 @@ static enum ndr_err_code ndr_push_samr_LookupRids(struct ndr_push *ndr, int flag
static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flags, struct samr_LookupRids *r)
{
+ uint32_t size_rids_0 = 0;
+ uint32_t length_rids_0 = 0;
uint32_t cntr_rids_0;
TALLOC_CTX *_mem_save_domain_handle_0;
TALLOC_CTX *_mem_save_rids_0;
@@ -7358,13 +7398,15 @@ static enum ndr_err_code ndr_pull_samr_LookupRids(struct ndr_pull *ndr, int flag
}
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rids));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rids));
- if (ndr_get_array_length(ndr, &r->in.rids) > ndr_get_array_size(ndr, &r->in.rids)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rids), ndr_get_array_length(ndr, &r->in.rids));
+ size_rids_0 = ndr_get_array_size(ndr, &r->in.rids);
+ length_rids_0 = ndr_get_array_length(ndr, &r->in.rids);
+ if (length_rids_0 > size_rids_0) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rids_0, length_rids_0);
}
- NDR_PULL_ALLOC_N(ndr, r->in.rids, ndr_get_array_size(ndr, &r->in.rids));
+ NDR_PULL_ALLOC_N(ndr, r->in.rids, size_rids_0);
_mem_save_rids_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->in.rids, 0);
- for (cntr_rids_0 = 0; cntr_rids_0 < r->in.num_rids; cntr_rids_0++) {
+ for (cntr_rids_0 = 0; cntr_rids_0 < length_rids_0; cntr_rids_0++) {
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.rids[cntr_rids_0]));
}
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rids_0, 0);
@@ -11036,6 +11078,8 @@ static enum ndr_err_code ndr_push_samr_Connect2(struct ndr_push *ndr, int flags,
static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags, struct samr_Connect2 *r)
{
uint32_t _ptr_system_name;
+ uint32_t size_system_name_1 = 0;
+ uint32_t length_system_name_1 = 0;
TALLOC_CTX *_mem_save_system_name_0;
TALLOC_CTX *_mem_save_connect_handle_0;
if (flags & NDR_IN) {
@@ -11052,11 +11096,13 @@ static enum ndr_err_code ndr_pull_samr_Connect2(struct ndr_pull *ndr, int flags,
NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
- if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
+ length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
+ if (length_system_name_1 > size_system_name_1) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
}
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
}
NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
@@ -11356,6 +11402,8 @@ static enum ndr_err_code ndr_push_samr_Connect3(struct ndr_push *ndr, int flags,
static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags, struct samr_Connect3 *r)
{
uint32_t _ptr_system_name;
+ uint32_t size_system_name_1 = 0;
+ uint32_t length_system_name_1 = 0;
TALLOC_CTX *_mem_save_system_name_0;
TALLOC_CTX *_mem_save_connect_handle_0;
if (flags & NDR_IN) {
@@ -11372,11 +11420,13 @@ static enum ndr_err_code ndr_pull_samr_Connect3(struct ndr_pull *ndr, int flags,
NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
- if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
+ length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
+ if (length_system_name_1 > size_system_name_1) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
}
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
}
NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
@@ -11456,6 +11506,8 @@ static enum ndr_err_code ndr_push_samr_Connect4(struct ndr_push *ndr, int flags,
static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags, struct samr_Connect4 *r)
{
uint32_t _ptr_system_name;
+ uint32_t size_system_name_1 = 0;
+ uint32_t length_system_name_1 = 0;
TALLOC_CTX *_mem_save_system_name_0;
TALLOC_CTX *_mem_save_connect_handle_0;
if (flags & NDR_IN) {
@@ -11472,11 +11524,13 @@ static enum ndr_err_code ndr_pull_samr_Connect4(struct ndr_pull *ndr, int flags,
NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
- if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
+ length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
+ if (length_system_name_1 > size_system_name_1) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
}
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
}
NDR_CHECK(ndr_pull_samr_ConnectVersion(ndr, NDR_SCALARS, &r->in.client_version));
@@ -11854,6 +11908,8 @@ _PUBLIC_ enum ndr_err_code ndr_push_samr_Connect5(struct ndr_push *ndr, int flag
_PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flags, struct samr_Connect5 *r)
{
uint32_t _ptr_system_name;
+ uint32_t size_system_name_1 = 0;
+ uint32_t length_system_name_1 = 0;
TALLOC_CTX *_mem_save_system_name_0;
TALLOC_CTX *_mem_save_info_in_0;
TALLOC_CTX *_mem_save_level_out_0;
@@ -11873,11 +11929,13 @@ _PUBLIC_ enum ndr_err_code ndr_pull_samr_Connect5(struct ndr_pull *ndr, int flag
NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
NDR_CHECK(ndr_pull_array_size(ndr, &r->in.system_name));
NDR_CHECK(ndr_pull_array_length(ndr, &r->in.system_name));
- if (ndr_get_array_length(ndr, &r->in.system_name) > ndr_get_array_size(ndr, &r->in.system_name)) {
- return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.system_name), ndr_get_array_length(ndr, &r->in.system_name));
+ size_system_name_1 = ndr_get_array_size(ndr, &r->in.system_name);
+ length_system_name_1 = ndr_get_array_length(ndr, &r->in.system_name);
+ if (length_system_name_1 > size_system_name_1) {
+ return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_system_name_1, length_system_name_1);
}
- NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t)));
- NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, ndr_get_array_length(ndr, &r->in.system_name), sizeof(uint16_t), CH_UTF16));
+ NDR_CHECK(ndr_check_string_terminator(ndr, length_system_name_1, sizeof(uint16_t)));
+ NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.system_name, length_system_name_1, sizeof(uint16_t), CH_UTF16));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
}
NDR_CHECK(ndr_pull_samr_ConnectAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));