Rob Shearman : msi: Check the return value of VerQueryValueW in msi_get_disk_file_version.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jun 27 09:11:13 CDT 2007


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

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Jun 26 22:22:52 2007 +0100

msi: Check the return value of VerQueryValueW in msi_get_disk_file_version.

---

 dlls/msi/action.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 01b5abb..1525602 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1982,7 +1982,11 @@ static LPWSTR msi_get_disk_file_version( LPCWSTR filename )
     version = msi_alloc( versize );
     GetFileVersionInfoW( filename, 0, versize, version );
 
-    VerQueryValueW( version, name, (LPVOID*)&lpVer, &sz );
+    if (!VerQueryValueW( version, name, (LPVOID*)&lpVer, &sz ))
+    {
+        msi_free( version );
+        return NULL;
+    }
     msi_free( version );
 
     sprintfW( filever, name_fmt,




More information about the wine-cvs mailing list