advapi32: fix CreateService regression

Huw D M Davies h.davies1 at physics.ox.ac.uk
Wed Dec 10 08:14:46 CST 2003


        Huw Davies <huw at codeweavers.com>
        Don't crash if lpDependencies is NULL
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/advapi32/service.c
===================================================================
RCS file: /home/wine/wine/dlls/advapi32/service.c,v
retrieving revision 1.40
diff -u -r1.40 service.c
--- dlls/advapi32/service.c	2 Dec 2003 03:48:53 -0000	1.40
+++ dlls/advapi32/service.c	10 Dec 2003 14:12:57 -0000
@@ -526,6 +526,8 @@
     UINT len = 0, n = 0;
     LPWSTR wstr;
 
+    if( !str )
+        return NULL;
     do {
         len += MultiByteToWideChar( CP_ACP, 0, &str[n], -1, NULL, 0 );
         n += (strlen( &str[n] ) + 1);



More information about the wine-patches mailing list