Author: cwittich
Date: Thu Sep 11 12:00:47 2008
New Revision: 36140
URL:
http://svn.reactos.org/svn/reactos?rev=36140&view=rev
Log:
fix heap corruption
Modified:
trunk/reactos/dll/win32/advapi32/service/sctrl.c
Modified: trunk/reactos/dll/win32/advapi32/service/sctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/service…
==============================================================================
--- trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/advapi32/service/sctrl.c [iso-8859-1] Thu Sep 11 12:00:47
2008
@@ -286,7 +286,7 @@
lpService->Arguments = HeapAlloc(GetProcessHeap(),
HEAP_ZERO_MEMORY,
- ControlPacket->dwSize * sizeof(WCHAR));
+ (ControlPacket->dwSize + 1) * sizeof(WCHAR));
if (lpService->Arguments == NULL)
return ERROR_OUTOFMEMORY;