Matt Durgavich : advapi32/tests: Fix for crashes on Mac OS X.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Aug 27 08:25:34 CDT 2015


Module: wine
Branch: master
Commit: b573986188a176da669cec6c9f4f6fe447b2d35f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b573986188a176da669cec6c9f4f6fe447b2d35f

Author: Matt Durgavich <mattdurgavich at gmail.com>
Date:   Tue Aug 25 22:10:51 2015 -0400

advapi32/tests: Fix for crashes on Mac OS X.

---

 dlls/advapi32/tests/cred.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/advapi32/tests/cred.c b/dlls/advapi32/tests/cred.c
index 0ee08ef..7fbd31a 100644
--- a/dlls/advapi32/tests/cred.c
+++ b/dlls/advapi32/tests/cred.c
@@ -295,7 +295,7 @@ static void test_generic(void)
 
     for (i = 0; i < count; i++)
     {
-        if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
+        if (creds[i]->TargetName && !strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
         {
             ok(creds[i]->Type == CRED_TYPE_GENERIC ||
                creds[i]->Type == CRED_TYPE_DOMAIN_PASSWORD, /* Vista */
@@ -353,7 +353,7 @@ static void test_domain_password(DWORD cred_type)
 
     for (i = 0; i < count; i++)
     {
-        if (!strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
+        if (creds[i]->TargetName && !strcmp(creds[i]->TargetName, TEST_TARGET_NAME))
         {
             ok(creds[i]->Type == cred_type, "expected creds[%d]->Type CRED_TYPE_DOMAIN_PASSWORD but got %d\n", i, creds[i]->Type);
             ok(!creds[i]->Flags, "expected creds[%d]->Flags 0 but got 0x%x\n", i, creds[i]->Flags);




More information about the wine-cvs mailing list