mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 13:53:41 +00:00
[MSI]
- Fix freed memory access and fix freeing of invalid pointer. (from http://www.winehq.org/pipermail/wine-patches/2010-October/094849.html ) See issue #3755 for more details. svn path=/trunk/; revision=49229
This commit is contained in:
parent
955c4d7d77
commit
26164e7b2e
1 changed files with 5 additions and 2 deletions
|
@ -1985,7 +1985,7 @@ static UINT ITERATE_CostFinalizeConditions(MSIRECORD *row, LPVOID param)
|
|||
VS_FIXEDFILEINFO *msi_get_disk_file_version( LPCWSTR filename )
|
||||
{
|
||||
static const WCHAR name[] = {'\\',0};
|
||||
VS_FIXEDFILEINFO *ret;
|
||||
VS_FIXEDFILEINFO *ptr, *ret;
|
||||
LPVOID version;
|
||||
DWORD versize, handle;
|
||||
UINT sz;
|
||||
|
@ -2002,12 +2002,15 @@ VS_FIXEDFILEINFO *msi_get_disk_file_version( LPCWSTR filename )
|
|||
|
||||
GetFileVersionInfoW( filename, 0, versize, version );
|
||||
|
||||
if (!VerQueryValueW( version, name, (LPVOID *)&ret, &sz ))
|
||||
if (!VerQueryValueW( version, name, (LPVOID *)&ptr, &sz ))
|
||||
{
|
||||
msi_free( version );
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret = msi_alloc( sz );
|
||||
memcpy( ret, ptr, sz );
|
||||
|
||||
msi_free( version );
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue