diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-31 03:11:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-31 03:11:42 +0000 |
commit | 3eade55dc7c842bdc50205c330802d211fae54d3 (patch) | |
tree | 09bca34d4463927d2930e9e926165d378ecb870f /source/rpc_parse/parse_net.c | |
parent | 7d455ee637b6ff70c95845f89d71573ca07b83f3 (diff) | |
download | samba-3eade55dc7c842bdc50205c330802d211fae54d3.tar.gz samba-3eade55dc7c842bdc50205c330802d211fae54d3.tar.xz samba-3eade55dc7c842bdc50205c330802d211fae54d3.zip |
bounds check next_token() to prevent possible buffer overflows
Diffstat (limited to 'source/rpc_parse/parse_net.c')
-rw-r--r-- | source/rpc_parse/parse_net.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/rpc_parse/parse_net.c b/source/rpc_parse/parse_net.c index 744bd455c95..182b3495db4 100644 --- a/source/rpc_parse/parse_net.c +++ b/source/rpc_parse/parse_net.c @@ -558,7 +558,9 @@ static int make_dom_sid2s(char *sids_str, DOM_SID2 *sids, int max_sids) if (sids_str == NULL || *sids_str == 0) return 0; - for (count = 0, ptr = sids_str; next_token(&ptr, s2, NULL) && count < max_sids; count++) + for (count = 0, ptr = sids_str; + next_token(&ptr, s2, NULL, sizeof(s2)) && count < max_sids; + count++) { DOM_SID tmpsid; string_to_sid(&tmpsid, s2); |