summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorHerb Lewis <herb@samba.org>2002-08-30 18:56:46 +0000
committerHerb Lewis <herb@samba.org>2002-08-30 18:56:46 +0000
commit39e21d4ef21152724f2fff573f88ee25216aef0e (patch)
tree28c1b3aa578594e26aa24b98d14b402271b2098b /source3
parent0b9bf47fda49b743b8b7335d121517709a33ae0f (diff)
downloadsamba-39e21d4ef21152724f2fff573f88ee25216aef0e.tar.gz
samba-39e21d4ef21152724f2fff573f88ee25216aef0e.tar.bz2
samba-39e21d4ef21152724f2fff573f88ee25216aef0e.zip
off by one in writing to malloced array. this fixes smbd crash I saw at
the CIFS conference - finally got purify working (This used to be commit cf9bb66aa9c3217cb8394058c65c84ffc6ae269a)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 118126a275..5ae942fac7 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -980,8 +980,8 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
/* and create (by appending rids) the 'domain' sids */
for (i = 0; i < info3->num_groups2; i++) {
- sid_copy(&all_group_SIDs[i+n_lgroupSIDs+1], &(info3->dom_sid.sid));
- if (!sid_append_rid(&all_group_SIDs[i+n_lgroupSIDs+1], info3->gids[i].g_rid)) {
+ sid_copy(&all_group_SIDs[i+n_lgroupSIDs], &(info3->dom_sid.sid));
+ if (!sid_append_rid(&all_group_SIDs[i+n_lgroupSIDs], info3->gids[i].g_rid)) {
nt_status = NT_STATUS_INVALID_PARAMETER;
DEBUG(3,("create_nt_token_info3: could not append additional group rid 0x%x\n",
info3->gids[i].g_rid));