[Bug 7834] PhotoImpact fails to start (bug in version.dll)

Wine Bugs wine-bugs at winehq.org
Sat Mar 24 17:21:22 CDT 2007


http://bugs.winehq.org/show_bug.cgi?id=7834





------- Additional Comments From focht at gmx.net  2007-24-03 17:21 -------
Hello,

good one :)

--- snip ---
0012:Call version.VerQueryValueA(001989c0,612af0e0
"\\StringFileInfo\\040904b0\\Internal",0034ef48,0034ef4c) ret=612a943e
..
0012:Call kernel32.WideCharToMultiByte(00000000,00000000,00198b54
L"ALBUM",ffffffff,001999b0,00000cc4,00000000,00000000) ret=6076b5d8
--- snip ---

In short: it reads a value from PE resource where it shouldnt.

There is a "helper" dll (u32cfg.dll) which implements its own kind of
"GetModuleInfo" by reading version resource and parsing the all stuff.
Ulead packs lots of non-standard stuff in its PE version resource.

I left only interesting part:

--- snip version resource ---
PRODUCTVERSION 3,0,0,0
FILEOS 0x4
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
        BLOCK "040904b0"
        {
                .....
                VALUE "InternalName", "ALBUM"
                .....
                VALUE "Section", "Album 12"
        }
}

BLOCK "VarFileInfo"
{
        VALUE "Translation", 0x0409 0x04B0
}
}

--- snip version resource ---

The problem lies in wine's VersionInfo32_QueryValue() ->
VersionInfo32_FindChild() -> strncmpiw() when a subblock key is supplied that
matches a *part* of resource key.
Now what happens ... due to partial string match of "Internal" ->
"InternalName", the value "ALBUM" is returned.
"Internal" has a special meaning to ulead software: the helper dll expects some
kind of GUID "{xxxx}" when parsing the value for this key.
It doesnt meet the expected format -> error msgbox.

So the fix would be using *exact* string match in VersionInfo32_FindChild().
This is cleanly a wine bug, yes.

---

BTW ... someone could add 2-byte opcode 0xFF,0x15,<addr32> (call dword ptr) insn
to the wine debugger ("programs/winedbg/be_i386.c:be_i386_is_func_call()")
After using attach i encountered lots of this stuff in debuggee (uses calls to
IAT, e.g. call dword ptr ds:[some_iat_entry])... 
Makes it somewhat harder debug if call destinations (dll imports) are not
recognized correctly.

Regards

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the wine-bugs mailing list