From: Rod Widdowson Date: Fri, 29 Oct 2010 17:01:13 +0000 (+0100) Subject: windows: terminate multi_sz correctly X-Git-Tag: upstream/1.8.0_pre1^2~4592 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=6aa9a8b9f6a8720ff8b5e983cc5a7005363747e2;p=packages%2Fo%2Fopenafs.git windows: terminate multi_sz correctly CreateProcess requires a null-terminated list of null-terminated strings as an environment parameter. A missing level of indirection was causing the final null to be missed, meaning that if bosserver ran from somewhere which had an environment the create process would fail. Fix the null termination. Change-Id: I3496d1c76570b80c760d0c0d8ee7fe046cec75b6 Reviewed-on: http://gerrit.openafs.org/3193 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- diff --git a/src/procmgmt/procmgmt_nt.c b/src/procmgmt/procmgmt_nt.c index 8f16c21c3..c7d351b41 100644 --- a/src/procmgmt/procmgmt_nt.c +++ b/src/procmgmt/procmgmt_nt.c @@ -609,7 +609,7 @@ StringArrayToMultiString(char *strArray[]) bufp += strLen + 1; } } - bufp = '\0'; /* terminate multistring */ + *bufp = '\0'; /* terminate multistring */ } }