diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-09-04 14:05:59 +1000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-09-14 14:48:49 -0700 |
commit | 72a8ea4d1545190bad85ee9f2216499e78b3625a (patch) | |
tree | 6dce3794568cabe605225852c2699f97c8b47728 /source3/lib/util_sid.c | |
parent | 9d44688681bc196baf1bccbdf84092ffc0510bb7 (diff) | |
download | samba-72a8ea4d1545190bad85ee9f2216499e78b3625a.tar.gz |
s3-util_sid use ARRAY_SIZE() to ensure we never overflow the dom_sid
This ensures that this, unlike the MAXSUBAUTHS macro, can't get
out of sync with the structure.
Andrew Bartlett
Diffstat (limited to 'source3/lib/util_sid.c')
-rw-r--r-- | source3/lib/util_sid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c index 9a2876baece..1f65f779912 100644 --- a/source3/lib/util_sid.c +++ b/source3/lib/util_sid.c @@ -293,7 +293,7 @@ format_error: bool sid_append_rid(struct dom_sid *sid, uint32_t rid) { - if (sid->num_auths < MAXSUBAUTHS) { + if (sid->num_auths < ARRAY_SIZE(sid->sub_auths)) { sid->sub_auths[sid->num_auths++] = rid; return true; } |