From d412bcc3aef1ccec410b82fac74e4e55897d9438 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Sun, 13 Dec 2009 19:47:55 +0000 Subject: [PATCH] rpcrt4: Handle [out]-only non-conformant strings in stubless servers. --- dlls/rpcrt4/ndr_stubless.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 2028fed020..5a66c2550d 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -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 */ -- 2.32.0.93.g670b81a890