Commit dae096f8 authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

NULL is a valid argument as handle for GetFileVersionInfoSize32A.

parent 629b9fa4
...@@ -264,7 +264,7 @@ void ConvertVersionInfo32To16( VS_VERSION_INFO32 *info32, ...@@ -264,7 +264,7 @@ void ConvertVersionInfo32To16( VS_VERSION_INFO32 *info32,
DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle ) DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle )
{ {
VS_FIXEDFILEINFO *vffi; VS_FIXEDFILEINFO *vffi;
DWORD len, ret; DWORD len, ret, offset;
BYTE buf[144]; BYTE buf[144];
TRACE( ver, "(%s,%p)\n", debugstr_a(filename), handle ); TRACE( ver, "(%s,%p)\n", debugstr_a(filename), handle );
...@@ -272,15 +272,16 @@ DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle ) ...@@ -272,15 +272,16 @@ DWORD WINAPI GetFileVersionInfoSize32A( LPCSTR filename, LPDWORD handle )
len = GetFileResourceSize32( filename, len = GetFileResourceSize32( filename,
MAKEINTRESOURCE32A(VS_FILE_INFO), MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO), MAKEINTRESOURCE32A(VS_VERSION_INFO),
handle ); &offset );
if (!len) return 0; if (!len) return 0;
ret = GetFileResource32( filename, ret = GetFileResource32( filename,
MAKEINTRESOURCE32A(VS_FILE_INFO), MAKEINTRESOURCE32A(VS_FILE_INFO),
MAKEINTRESOURCE32A(VS_VERSION_INFO), MAKEINTRESOURCE32A(VS_VERSION_INFO),
*handle, sizeof( buf ), buf ); offset, sizeof( buf ), buf );
if (!ret) return 0; if (!ret) return 0;
if ( handle ) *handle = offset;
if ( VersionInfoIs16( buf ) ) if ( VersionInfoIs16( buf ) )
vffi = (VS_FIXEDFILEINFO *)VersionInfo16_Value( (VS_VERSION_INFO16 *)buf ); vffi = (VS_FIXEDFILEINFO *)VersionInfo16_Value( (VS_VERSION_INFO16 *)buf );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment