summaryrefslogtreecommitdiff
path: root/libcli/security
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-01-23 13:53:48 +0100
committerVolker Lendecke <vl@samba.org>2010-01-23 16:28:11 +0100
commitf1c889a4e61d6d751cbabd8014b4345b8051b97c (patch)
tree1e740d48aac472f191a25f273a3641b7bf753261 /libcli/security
parent7fe66e06c4df575c410d4d70ff38f120c2f4363b (diff)
downloadsamba-f1c889a4e61d6d751cbabd8014b4345b8051b97c.tar.gz
samba-f1c889a4e61d6d751cbabd8014b4345b8051b97c.tar.bz2
samba-f1c889a4e61d6d751cbabd8014b4345b8051b97c.zip
libcli/security: Fix a valgrind error in dom_sid_parse
Diffstat (limited to 'libcli/security')
-rw-r--r--libcli/security/dom_sid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcli/security/dom_sid.c b/libcli/security/dom_sid.c
index 9952977fa9..6a046cd806 100644
--- a/libcli/security/dom_sid.c
+++ b/libcli/security/dom_sid.c
@@ -113,6 +113,10 @@ bool dom_sid_parse(const char *sidstr, struct dom_sid *ret)
if (sidstr[i] == '-') num_sub_auths++;
}
+ if (num_sub_auths > ARRAY_SIZE(ret->sub_auths)) {
+ return false;
+ }
+
ret->sid_rev_num = rev;
ret->id_auth[0] = 0;
ret->id_auth[1] = 0;