Alexandre Julliard : advapi32: Fix the length written to the pipe for the start message.

Alexandre Julliard julliard at winehq.org
Mon Jan 7 08:39:17 CST 2008


Module: wine
Branch: master
Commit: 781c3b9c6aebacd869a026993f8ae84be2159de1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=781c3b9c6aebacd869a026993f8ae84be2159de1

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Jan  7 12:18:11 2008 +0100

advapi32: Fix the length written to the pipe for the start message.

---

 dlls/advapi32/service.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index 594d607..4c03c1e 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);




More information about the wine-cvs mailing list