git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d44688
)
s3-util_sid use ARRAY_SIZE() to ensure we never overflow the dom_sid
author
Andrew Bartlett
<abartlet@samba.org>
Sat, 4 Sep 2010 04:05:59 +0000
(14:05 +1000)
committer
Jeremy Allison
<jra@samba.org>
Tue, 14 Sep 2010 21:48:49 +0000
(14:48 -0700)
This ensures that this, unlike the MAXSUBAUTHS macro, can't get
out of sync with the structure.
Andrew Bartlett
source3/lib/util_sid.c
patch
|
blob
|
history
diff --git
a/source3/lib/util_sid.c
b/source3/lib/util_sid.c
index 9a2876baece534510dd3c6c5397e98d4366c47fc..1f65f779912cea7e22e9a08859bfd60e03924b0c 100644
(file)
--- 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;
}