[PATCH 1/4] rpcrt4: Handle FC_NON_ENCAPSULATED_UNION in calc_arg_size().

Zebediah Figura z.figura12 at gmail.com
Sat Apr 4 18:15:29 CDT 2020


Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/rpcrt4/ndr_stubless.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index cc52ee27e8..0ef421daf2 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -210,6 +210,12 @@ static DWORD calc_arg_size(MIDL_STUB_MESSAGE *pStubMsg, PFORMAT_STRING pFormat)
             pStubMsg->MaxCount = 0;
         size *= pStubMsg->MaxCount;
         break;
+    case FC_NON_ENCAPSULATED_UNION:
+    {
+        DWORD offset = *(const WORD *)(pFormat + 6 + pStubMsg->CorrDespIncrement);
+        size = *(const WORD *)(pFormat + 8 + pStubMsg->CorrDespIncrement + offset);
+        break;
+    }
     default:
         FIXME("Unhandled type %02x\n", *pFormat);
         /* fallthrough */
-- 
2.26.0




More information about the wine-devel mailing list