Commit 688c6a78 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

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>).
parent 5e09c298
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment