diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/wb_fill_pwent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/winbindd/wb_fill_pwent.c b/source3/winbindd/wb_fill_pwent.c index c1f83e5e91..8c8f839a51 100644 --- a/source3/winbindd/wb_fill_pwent.c +++ b/source3/winbindd/wb_fill_pwent.c @@ -162,7 +162,10 @@ static void wb_fill_pwent_getgrsid_done(struct tevent_req *subreq) strlcpy(state->pw->pw_name, output_username, sizeof(state->pw->pw_name)); - fstrcpy(state->pw->pw_gecos, state->info->full_name); + /* FIXME The full_name can be longer than 255 chars */ + strlcpy(state->pw->pw_gecos, + state->info->full_name != NULL ? state->info->full_name : "", + sizeof(state->pw->pw_gecos)); /* Home directory and shell */ ok = fillup_pw_field(lp_template_homedir(), |