summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_group.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nsswitch/winbindd_group.c')
-rw-r--r--source3/nsswitch/winbindd_group.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c
index b31dc92b38..4805e628dd 100644
--- a/source3/nsswitch/winbindd_group.c
+++ b/source3/nsswitch/winbindd_group.c
@@ -1098,7 +1098,7 @@ enum winbindd_result winbindd_getusersids(struct winbindd_cli_state *state)
enum winbindd_result result = WINBINDD_ERROR;
unsigned int i;
TALLOC_CTX *mem_ctx;
- char *ret;
+ char *ret = NULL;
uint32 num_groups;
unsigned ofs, ret_size = 0;
@@ -1144,7 +1144,7 @@ enum winbindd_result winbindd_getusersids(struct winbindd_cli_state *state)
ofs = 0;
for (i = 0; i < num_groups; i++) {
const char *s = sid_string_static(user_grpsids[i]);
- safe_strcpy(ret + ofs, s, ret_size - ofs);
+ safe_strcpy(ret + ofs, s, ret_size - ofs - 1);
ofs += strlen(ret+ofs) + 1;
}