From 781c3b9c6aebacd869a026993f8ae84be2159de1 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 7 Jan 2008 12:18:11 +0100 Subject: [PATCH] advapi32: Fix the length written to the pipe for the start message. --- dlls/advapi32/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c index 594d6077af8..4c03c1e97f8 100644 --- a/dlls/advapi32/service.c +++ b/dlls/advapi32/service.c @@ -497,7 +497,7 @@ static BOOL service_send_start_message(HANDLE pipe, LPCWSTR *argv, DWORD argc) } *p=0; - r = WriteFile(pipe, ssi, sizeof *ssi + len*sizeof(WCHAR), &count, NULL); + r = WriteFile(pipe, ssi, sizeof *ssi + (len-1)*sizeof(WCHAR), &count, NULL); if (r) { r = ReadFile(pipe, &result, sizeof result, &count, NULL);