Alex Villacís Lasso : oleaut32: typelib - fix regression in MSFT typelib parsing.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Nov 9 06:08:45 CST 2006
Module: wine
Branch: master
Commit: 64410e5907443ef8f8e0d4a1f96b6098101ac2af
URL: http://source.winehq.org/git/wine.git/?a=commit;h=64410e5907443ef8f8e0d4a1f96b6098101ac2af
Author: Alex Villacís Lasso <a_villacis at palosanto.com>
Date: Wed Nov 8 19:33:46 2006 -0500
oleaut32: typelib - fix regression in MSFT typelib parsing.
---
dlls/oleaut32/typelib.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 92532f5..a12deb1 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -1173,7 +1173,7 @@ static void dump_TLBFuncDescOne(const TL
dump_FUNCDESC(&(pfd->funcdesc));
MESSAGE("\thelpstring: %s\n", debugstr_w(pfd->HelpString));
- MESSAGE("\tentry: %s\n", debugstr_w(pfd->Entry));
+ MESSAGE("\tentry: %s\n", (pfd->Entry == (void *)-1) ? "invalid" : debugstr_w(pfd->Entry));
}
static void dump_TLBFuncDesc(const TLBFuncDesc * pfd)
{
@@ -1813,7 +1813,9 @@ MSFT_DoFuncs(TLBContext* pcx,
{
if ( pFuncRec->FKCCIC & 0x2000 )
{
- (*pptfd)->Entry = SysAllocString((WCHAR*)pFuncRec->OptAttr[2]);
+ if (HIWORD(pFuncRec->OptAttr[2]) != 0)
+ ERR("ordinal 0x%08x invalid, HIWORD != 0\n", pFuncRec->OptAttr[2]);
+ (*pptfd)->Entry = (BSTR)pFuncRec->OptAttr[2];
}
else
{
@@ -1832,6 +1834,10 @@ MSFT_DoFuncs(TLBContext* pcx,
}
}
}
+ else
+ {
+ (*pptfd)->Entry = (BSTR)-1;
+ }
}
}
@@ -4437,7 +4443,8 @@ static ULONG WINAPI ITypeInfo_fnRelease(
pCustDataNext = pCustData->next;
TLB_Free(pCustData);
}
- SysFreeString(pFInfo->Entry);
+ if (HIWORD(pFInfo->Entry) != 0 && pFInfo->Entry != (BSTR)-1)
+ SysFreeString(pFInfo->Entry);
SysFreeString(pFInfo->HelpString);
SysFreeString(pFInfo->Name);
More information about the wine-cvs
mailing list