mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
Rob Shearman : rpcrt4: Handle complex arrays in calc_arg_size. <rob at codeweavers.com>
svn path=/trunk/; revision=31859
This commit is contained in:
parent
88179de4f8
commit
cc0209690e
3 changed files with 10 additions and 2 deletions
|
@ -2655,7 +2655,7 @@ static unsigned long ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg,
|
unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg,
|
||||||
PFORMAT_STRING pFormat)
|
PFORMAT_STRING pFormat)
|
||||||
{
|
{
|
||||||
PFORMAT_STRING desc;
|
PFORMAT_STRING desc;
|
||||||
|
|
|
@ -62,4 +62,6 @@ extern const NDR_BUFFERSIZE NdrBufferSizer[];
|
||||||
extern const NDR_MEMORYSIZE NdrMemorySizer[];
|
extern const NDR_MEMORYSIZE NdrMemorySizer[];
|
||||||
extern const NDR_FREE NdrFreer[];
|
extern const NDR_FREE NdrFreer[];
|
||||||
|
|
||||||
|
unsigned long ComplexStructSize(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat);
|
||||||
|
|
||||||
#endif /* __WINE_NDR_MISC_H */
|
#endif /* __WINE_NDR_MISC_H */
|
||||||
|
|
|
@ -849,6 +849,12 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
|
||||||
case RPC_FC_LGFARRAY:
|
case RPC_FC_LGFARRAY:
|
||||||
size = *(const DWORD*)(pFormat + 2);
|
size = *(const DWORD*)(pFormat + 2);
|
||||||
break;
|
break;
|
||||||
|
case RPC_FC_BOGUS_ARRAY:
|
||||||
|
pFormat = ComputeConformance(pStubMsg, NULL, pFormat + 4, *(const WORD*)&pFormat[2]);
|
||||||
|
TRACE("conformance = %ld\n", pStubMsg->MaxCount);
|
||||||
|
pFormat = ComputeVariance(pStubMsg, NULL, pFormat, pStubMsg->MaxCount);
|
||||||
|
size = ComplexStructSize(pStubMsg, pFormat);
|
||||||
|
size *= pStubMsg->MaxCount;
|
||||||
default:
|
default:
|
||||||
FIXME("Unhandled type %02x\n", *pFormat);
|
FIXME("Unhandled type %02x\n", *pFormat);
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
|
|
Loading…
Reference in a new issue