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

Zebediah Figura z.figura12 at gmail.com
Wed Oct 3 12:08:21 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 | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index 2f49bb5..39dd34e 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -64,7 +64,13 @@ __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 */
+                  "testb $0x08,1(%edx)\n\t"       /* Oi_HAS_RPCFLAGS */
+                  "jz 1f\n\t"
                   "movzwl 8(%edx),%eax\n\t"       /* arguments size */
+                  "jmp 2f\n\t"
+                  "1:\n\t"
+                  "movzwl 4(%edx),%eax\n\t"
+                  "2:\n\t"
                   "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