REGRESSION: 0.9.24 crashes on regsvr32 msvbvm60.dll, temporary workaround attached

a_villacis at palosanto.com a_villacis at palosanto.com
Sat Oct 28 19:54:43 CDT 2006


Somewhere between 0.9.23 and 0.9.24, a commit introduced a bug in oleaut32
which results in a nasty crash when parsing some MSFT typelibs. Notably, 
regsvr32 msvbvm60.dll" will crash on this bug, although I experienced it
with DBGRID32.OCX too. I have traced the point of the crash to
typelib.c:1814

                    if ( pFuncRec->FKCCIC & 0x2000 )
                    {
                       (*pptfd)->Entry =
SysAllocString((WCHAR*)pFuncRec->OptAttr[2]);
                    }

Apparently, 0x2000 as a flag in FKCCIC indicates that pFuncRec->OptAttr[2]
is a pointer to some string. If what little understanding I have of
typelib loading is correct, these typelibs are read from DLL resources on
disk. Therefore, I fail to grasp how they can possibly refer to valid
memory locations. I have this attached patch that temporarily plugs the
crash, but I don't think the code is right in the first place. Or am I
missing some crucial fact about typelib parsing?

>From compare with version 1.266:

                    if ( pFuncRec->FKCCIC & 0x2000 )
                    {
                       (*pptfd)->Entry = (WCHAR*) pFuncRec->OptAttr[2] ;
                    }

I would dare to say that it has always been wrong, only now is crashing
because the code now attempts to strdup() it with SysAllocString.

Alex Villacís Lasso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wine-oleaut32-workaround-MSFT-crash.patch
Type: text/x-patch
Size: 840 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20061028/825431b5/wine-oleaut32-workaround-MSFT-crash.bin


More information about the wine-devel mailing list