Marcus Meissner : msi: Check for return value of GetUserName (Coverity).
Alexandre Julliard
julliard at winehq.org
Wed Sep 7 12:35:33 CDT 2011
Module: wine
Branch: master
Commit: ac0a7b644fa464fa640e06a6e26b2191b5a29a92
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ac0a7b644fa464fa640e06a6e26b2191b5a29a92
Author: Marcus Meissner <meissner at suse.de>
Date: Wed Sep 7 15:48:23 2011 +0200
msi: Check for return value of GetUserName (Coverity).
---
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)
More information about the wine-cvs
mailing list