advavpi32: Don't allocate memory for empty argument string and pass
NULL instead.
Vitaliy Margolen
wine-patch at kievinfo.com
Sat Dec 31 13:36:33 CST 2005
ChangeLog:
advavpi32: Don't allocate memory for empty argument string and pass NULL instead.
This fixes heap corruption leading to Bug 4133.
dlls/advapi32/service.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
-------------- next part --------------
1d62c952cc5eefc52142d904f5e74b69949c01e7
diff --git a/dlls/advapi32/service.c b/dlls/advapi32/service.c
index cc6a36c..60d0f8d 100644
--- a/dlls/advapi32/service.c
+++ b/dlls/advapi32/service.c
@@ -359,6 +359,15 @@ static DWORD WINAPI service_thread(LPVOI
len += strlenW(&str[len]) + 1;
argc++;
}
+
+ if (!argc)
+ {
+ if (info->unicode)
+ info->proc.w(0, NULL);
+ else
+ info->proc.a(0, NULL);
+ return 0;
+ }
if (info->unicode)
{
More information about the wine-patches
mailing list