From 9c6fac65d8241d1d9ddbb2c1104ee07985286955 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Tue, 26 Jun 2007 22:22:52 +0100 Subject: [PATCH] msi: Check the return value of VerQueryValueW in msi_get_disk_file_version. --- dlls/msi/action.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/msi/action.c b/dlls/msi/action.c index 01b5abbc0c0..1525602dde5 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,