rpcrt4: Handle [out]-only non-conformant strings in stubless servers.

This commit is contained in:
Rob Shearman 2009-12-13 19:47:55 +00:00 committed by Alexandre Julliard
parent b24aa1c153
commit d412bcc3ae
1 changed files with 12 additions and 0 deletions

View File

@ -999,6 +999,18 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
size = ComplexStructSize(pStubMsg, pFormat);
size *= pStubMsg->MaxCount;
break;
case RPC_FC_C_CSTRING:
case RPC_FC_C_WSTRING:
if (*pFormat == RPC_FC_C_CSTRING)
size = sizeof(CHAR);
else
size = sizeof(WCHAR);
if (pFormat[1] == RPC_FC_STRING_SIZED)
ComputeConformance(pStubMsg, NULL, pFormat + 2, 0);
else
pStubMsg->MaxCount = 0;
size *= pStubMsg->MaxCount;
break;
default:
FIXME("Unhandled type %02x\n", *pFormat);
/* fallthrough */