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:
Robert Shearman 2006-07-08 11:54:40 +01:00 committed by Alexandre Julliard
parent 5e09c29867
commit 688c6a78f1

View file

@ -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,