From d98d7f397389cca8f96318a1644431012a6211be Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 16 Apr 2014 09:26:41 +0000 Subject: [PATCH] * pwdgrp.cc (client_request_pwdgrp::pwd_serve): Add 1 to the message length to account for the trailing NUL. --- winsup/cygserver/ChangeLog | 5 +++++ winsup/cygserver/pwdgrp.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygserver/ChangeLog b/winsup/cygserver/ChangeLog index 765af53a1..431629d56 100644 --- a/winsup/cygserver/ChangeLog +++ b/winsup/cygserver/ChangeLog @@ -1,3 +1,8 @@ +2014-04-16 Corinna Vinschen + + * pwdgrp.cc (client_request_pwdgrp::pwd_serve): Add 1 to the message + length to account for the trailing NUL. + 2014-04-16 Corinna Vinschen * cygserver-config: Use numeric id 18 instead of "system" in chown. diff --git a/winsup/cygserver/pwdgrp.cc b/winsup/cygserver/pwdgrp.cc index 90e88ce58..cc12deadd 100644 --- a/winsup/cygserver/pwdgrp.cc +++ b/winsup/cygserver/pwdgrp.cc @@ -58,7 +58,7 @@ client_request_pwdgrp::pwd_serve () (uint32_t) pwd->pw_gid, pwd->pw_gecos ?: "", pwd->pw_dir ?: "", - pwd->pw_shell ?: "")); + pwd->pw_shell ?: "") + 1); else { switch (_parameters.in.type) @@ -109,7 +109,7 @@ client_request_pwdgrp::grp_serve () "%s:%s:%u:", grp->gr_name ?: "", grp->gr_passwd ?: "", - (uint32_t) grp->gr_gid)); + (uint32_t) grp->gr_gid) + 1); else { switch (_parameters.in.type)