diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-26 20:07:32 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-06-28 18:46:23 +0200 |
commit | 15b9198644613536401a49dd779d4e9be706d980 (patch) | |
tree | f17e6e97c6100586ff495d9bf368a386d5f0986f /librpc | |
parent | 7468ce6f93d21af2bec35d52d16efe9cced0d1e8 (diff) | |
download | samba-15b9198644613536401a49dd779d4e9be706d980.tar.gz samba-15b9198644613536401a49dd779d4e9be706d980.tar.bz2 samba-15b9198644613536401a49dd779d4e9be706d980.zip |
librpc/ndr: Initilaise the remainder of struct dom_sid after a pull
This copes with the fact that r->sub_auths is a fixed-size array, not
an allocated pointer, and so will still have some bytes no filled in
if the sid did not have a MAX_SUB_AUTHS sub-authorities.
Andrew Bartlett
Diffstat (limited to 'librpc')
-rw-r--r-- | librpc/ndr/ndr_sec_helper.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/librpc/ndr/ndr_sec_helper.c b/librpc/ndr/ndr_sec_helper.c index 984b6bd4aa..66b0013b9c 100644 --- a/librpc/ndr/ndr_sec_helper.c +++ b/librpc/ndr/ndr_sec_helper.c @@ -335,6 +335,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_dom_sid(struct ndr_pull *ndr, int ndr_flags, 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)); + ZERO_STRUCT(r->sub_auths); 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])); } |