Commit 2f3c474e authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

advapi32: Avoid a crash when storing credentials on MacOS.

parent f222582a
......@@ -571,7 +571,7 @@ static DWORD mac_write_credential(const CREDENTIALW *credential, BOOL preserve_b
TRACE("adding server %s, domain %s, username %s using Keychain\n", servername, domain, username);
status = SecKeychainAddInternetPassword(NULL, strlen(servername), servername,
strlen(domain), domain, strlen(username),
domain ? strlen(domain) : 0, domain, strlen(username),
username, 0, NULL, 0,
0 /* no protocol */,
kSecAuthenticationTypeDefault,
......@@ -583,7 +583,7 @@ static DWORD mac_write_credential(const CREDENTIALW *credential, BOOL preserve_b
SecKeychainItemRef keychain_item;
status = SecKeychainFindInternetPassword(NULL, strlen(servername), servername,
strlen(domain), domain,
domain ? strlen(domain) : 0, domain,
strlen(username), username,
0, NULL /* any path */, 0,
0 /* any protocol */,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment