diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-09-06 18:32:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:43:56 -0500 |
commit | 995205fc60f87e1a02aa1c6f309db55ae18e908a (patch) | |
tree | bf796212b1c95b755ef07b1a91b7e26e45dbbd87 /source3/libndr/sid.c | |
parent | a7be2ec7c5eb8bda76eaec0eaff7e1a7b2b39433 (diff) | |
download | samba-995205fc60f87e1a02aa1c6f309db55ae18e908a.tar.gz samba-995205fc60f87e1a02aa1c6f309db55ae18e908a.tar.bz2 samba-995205fc60f87e1a02aa1c6f309db55ae18e908a.zip |
r18188: merge 3.0-libndr branch
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
Diffstat (limited to 'source3/libndr/sid.c')
-rw-r--r-- | source3/libndr/sid.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/libndr/sid.c b/source3/libndr/sid.c index 0bb42a3683..f8c284e93c 100644 --- a/source3/libndr/sid.c +++ b/source3/libndr/sid.c @@ -42,22 +42,17 @@ NTSTATUS ndr_push_dom_sid(struct ndr_push *ndr, int ndr_flags, const struct dom_ NTSTATUS ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *r) { uint32_t cntr_sub_auths_0; - TALLOC_CTX *_mem_save_sub_auths_0; if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_pull_align(ndr, 4)); NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->sid_rev_num)); - NDR_CHECK(ndr_pull_int8(ndr, NDR_SCALARS, &r->num_auths)); - if (r->num_auths < 0 || r->num_auths > 15) { + NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->num_auths)); + if (r->num_auths > 15) { return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range"); } NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->id_auth, 6)); - NDR_PULL_ALLOC_N(ndr, r->sub_auths, r->num_auths); - _mem_save_sub_auths_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->sub_auths, 0); for (cntr_sub_auths_0 = 0; cntr_sub_auths_0 < r->num_auths; cntr_sub_auths_0++) { NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_auths[cntr_sub_auths_0])); } - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sub_auths_0, 0); } if (ndr_flags & NDR_BUFFERS) { } |