From 56c23c527b76bb1309c346ecb574ceb7f29c2e96 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 15 Jan 2004 15:36:01 +0000 Subject: [PATCH] And another memory corruption in winbind. Arg 3 of safe_strcpy does not include the terminating 0. Volker (This used to be commit 945c7807641e82500c84e833f03f381497f0a2d0) --- source3/nsswitch/winbindd_group.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/nsswitch/winbindd_group.c b/source3/nsswitch/winbindd_group.c index 3373e409e90..4805e628dd8 100644 --- a/source3/nsswitch/winbindd_group.c +++ b/source3/nsswitch/winbindd_group.c @@ -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; } -- 2.11.4.GIT