mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
oleaut32: MSFT_DoFuncs: "reclength" of the function information record is stored
in a 16 bit int and not in a 8 bit int as previously supposed, using a 0x1ff mask. Upper 16 bits contains the ordinal number of the function. Allocation of the "recbuf" must be modified, to support larger data (based on a patch by White Snake <whitesnake78@mail.com>).
This commit is contained in:
parent
5e09c29867
commit
688c6a78f1
1 changed files with 3 additions and 2 deletions
|
@ -1721,7 +1721,7 @@ MSFT_DoFuncs(TLBContext* pcx,
|
|||
int infolen, nameoffset, reclength, nrattributes, i;
|
||||
int recoffset = offset + sizeof(INT);
|
||||
|
||||
char recbuf[512];
|
||||
char *recbuf = HeapAlloc(GetProcessHeap(), 0, 0xffff);
|
||||
MSFT_FuncRecord * pFuncRec=(MSFT_FuncRecord *) recbuf;
|
||||
TLBFuncDesc *ptfd_prev = NULL;
|
||||
|
||||
|
@ -1747,7 +1747,7 @@ MSFT_DoFuncs(TLBContext* pcx,
|
|||
/* read the function information record */
|
||||
MSFT_ReadLEDWords(&reclength, sizeof(INT), pcx, recoffset);
|
||||
|
||||
reclength &= 0x1ff;
|
||||
reclength &= 0xffff;
|
||||
|
||||
MSFT_ReadLEDWords(pFuncRec, reclength - sizeof(INT), pcx, DO_NOT_SEEK);
|
||||
|
||||
|
@ -1892,6 +1892,7 @@ MSFT_DoFuncs(TLBContext* pcx,
|
|||
pptfd = & ((*pptfd)->next);
|
||||
recoffset += reclength;
|
||||
}
|
||||
HeapFree(GetProcessHeap(), 0, recbuf);
|
||||
}
|
||||
|
||||
static void MSFT_DoVars(TLBContext *pcx, ITypeInfoImpl *pTI, int cFuncs,
|
||||
|
|
Loading…
Reference in a new issue