change in dlls/version/info.c breaks IBM Translation Manager

Paul Vriens Paul.Vriens at xs4all.nl
Sun Jul 24 12:17:42 CDT 2005


On Sun, 2005-07-24 at 13:26, Phil Krylov wrote:
> On Sun, 24 Jul 2005 11:56:38 +0200
> Paul Vriens <Paul.Vriens at xs4all.nl> wrote:
> 
> > could you also send me a +ver trace?
> 
> Here it is (attached).
> 
> -- Ph.
Thanks for the trace.

It looks like TM is doing a GetFileVersionInfoA with a fixed size of
512. It should have used GetFileVersionInfoSizeA probably first to get
the size of the needed buffer.

MSDN:

===
The VerQueryValue function retrieves specified version information from
the specified version-information resource. To retrieve the appropriate
resource, before you call VerQueryValue, you must first call the
GetFileVersionInfoSize function, and then the GetFileVersionInfo
function.
===

The smaller than needed buffer leads us to the not-correct strings that
show up in your trace:

trace:ver:ConvertVersionInfo32To16 wLength 114, wValueLength 39, bText
64500, value 0x7baffbdc, child 0x7baffc2c
trace:ver:ConvertVersionInfo32To16 Copied key from 0x7baffbd6 to 0x7baffb08: "?\x01"
trace:ver:ConvertVersionInfo32To16 Copied value from 0x7baffbdc to 0x7baffb0c: "????????\x05"
trace:ver:ConvertVersionInfo32To16 Converting 0x7baffc2c to 0x7baffb18
trace:ver:ConvertVersionInfo32To16 wLength 114, wValueLength 118, bText 105, value 0x7baffc48, child 0x7baffd34
trace:ver:ConvertVersionInfo32To16 Copied key from 0x7baffc32 to 0x7baffb1c: "ce Pack 2"
trace:ver:ConvertVersionInfo32To16 Copied value from 0x7baffc48 to 0x7baffb28: "??\x01"

This means I have to change:

    768     if ( !VersionInfoIs16( info ) )
    769     {
    770         /* FIXME : The conversion is maybe a bit overkill, we only need 1 value */
    771
    772         ConvertVersionInfo32To16( (VS_VERSION_INFO_STRUCT32 *)info,
    773                                   (VS_VERSION_INFO_STRUCT16 *)info );
    774     }

in info.c sooner than I expected :-(.

I'm not able to reproduce this with either my own riched20.dll or the one you provided. But
the reason it fails is clear now.

Will come up with a fix soon.

Cheers,

Paul.




More information about the wine-devel mailing list