advapi32: Do not copy string if destination pointer is NULL
Andrew Talbot
andrew.talbot at talbotville.com
Thu Apr 17 17:03:33 CDT 2008
Changelog:
advapi32: Do not copy string if destination pointer is NULL.
diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c
index 333ad86..ec8f64a 100644
--- a/dlls/advapi32/security.c
+++ b/dlls/advapi32/security.c
@@ -1849,7 +1849,8 @@ LookupPrivilegeNameW( LPCWSTR lpSystemName, PLUID lpLuid, LPWSTR lpName,
}
else
{
- strcpyW(lpName, WellKnownPrivNames[lpLuid->LowPart]);
+ if (lpName)
+ strcpyW(lpName, WellKnownPrivNames[lpLuid->LowPart]);
*cchName = privNameLen;
return TRUE;
}
More information about the wine-patches
mailing list