78499: Subject: [PATCH] msi: check for return value of GetUserName (Coverity)

buildbot at kegel.com buildbot at kegel.com
Wed Sep 7 09:21:14 CDT 2011


This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.

The Buildbot has detected a failed build on builder runtests-default while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-default/builds/66 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed shell_3


For more info about this message, see http://wiki.winehq.org/BuildBot


-------------- next part --------------
From: Marcus Meissner <meissner at suse.de>
Subject: [PATCH] msi: check for return value of GetUserName (Coverity)
Message-Id: <1315403303-18165-1-git-send-email-meissner at suse.de>
Date: Wed,  7 Sep 2011 15:48:23 +0200

Hi,

while this call cannot fail in the current advapi32 implementation,
just check for the return value. CID 5132

Ciao, Marcus
---
 dlls/msi/package.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/package.c b/dlls/msi/package.c
index 1025607..bec7627 100644
--- a/dlls/msi/package.c
+++ b/dlls/msi/package.c
@@ -501,7 +501,8 @@ static UINT set_user_sid_prop( MSIPACKAGE *package )
     UINT r = ERROR_FUNCTION_FAILED;
 
     size = 0;
-    GetUserNameW( NULL, &size );
+    if (!GetUserNameW( NULL, &size ))
+	return r;
 
     user_name = msi_alloc( (size + 1) * sizeof(WCHAR) );
     if (!user_name)
-- 
1.7.1



More information about the wine-tests-results mailing list