Zebediah Figura : rpcrt4: Handle FC_NON_ENCAPSULATED_UNION in calc_arg_size().

Alexandre Julliard julliard at winehq.org
Mon Apr 6 15:53:20 CDT 2020


Module: wine
Branch: master
Commit: ff7f92c0b076d7801274f2423dd44ddd10f895b1
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ff7f92c0b076d7801274f2423dd44ddd10f895b1

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sat Apr  4 18:15:29 2020 -0500

rpcrt4: Handle FC_NON_ENCAPSULATED_UNION in calc_arg_size().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45699
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 */




More information about the wine-cvs mailing list