[PATCH] rpcrt4: Handle absense of RPC flags in call_stubless_func() thunk.

Zebediah Figura z.figura12 at gmail.com
Fri Oct 5 16:44:08 CDT 2018


If Oi_HAS_RPCFLAGS is not set, then the stack size is at offset 4, not 8.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/rpcrt4/cproxy.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index 2f49bb5..ab24b81 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -64,7 +64,10 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
                   "movl 8(%ecx),%edx\n\t"         /* info->FormatStringOffset */
                   "movzwl (%edx,%eax,2),%edx\n\t" /* FormatStringOffset[index] */
                   "addl 4(%ecx),%edx\n\t"         /* info->ProcFormatString + offset */
-                  "movzwl 8(%edx),%eax\n\t"       /* arguments size */
+                  "movzbl 1(%edx),%eax\n\t"       /* Oi_flags */
+                  "andl $0x08,%eax\n\t"           /* Oi_HAS_RPCFLAGS */
+                  "shrl $1,%eax\n\t"
+                  "movzwl 4(%edx,%eax),%eax\n\t"  /* arguments size */
                   "pushl %eax\n\t"
                   __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
                   "leal 8(%esp),%eax\n\t"         /* &This */
-- 
2.7.4




More information about the wine-devel mailing list