https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1723c223e3032fcc460e7…
commit 1723c223e3032fcc460e7c212ab5b72be9238351
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Mon May 24 08:56:17 2021 +0200
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Thu Jan 6 03:48:29 2022 +0300
[RPCRT4] Fix implicit in attribute handling in write_param_fs()
Cherry-pick wine-5.0-rc1-50-g1aaf870 by Jacek Caban.
https://source.winehq.org/git/wine.git/?a=commit;h=1aaf870039dfb8419ae060d8…
(OLEAUT32_WINETEST part shall be imported later.)
CORE-17884
---
dll/win32/rpcrt4/ndr_typelib.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dll/win32/rpcrt4/ndr_typelib.c b/dll/win32/rpcrt4/ndr_typelib.c
index ac101067c8d..5aa98bb9c7b 100644
--- a/dll/win32/rpcrt4/ndr_typelib.c
+++ b/dll/win32/rpcrt4/ndr_typelib.c
@@ -1029,16 +1029,18 @@ static HRESULT write_param_fs(ITypeInfo *typeinfo, unsigned char
*type,
BOOL is_return, unsigned short *stack_offset)
{
USHORT param_flags = desc->paramdesc.wParamFlags;
- int is_in = param_flags & PARAMFLAG_FIN;
- int is_out = param_flags & PARAMFLAG_FOUT;
TYPEDESC *tdesc = &desc->tdesc, *tfs_tdesc;
unsigned short server_size;
unsigned short stack_size = get_stack_size(typeinfo, tdesc);
unsigned char basetype;
unsigned short flags;
+ int is_in, is_out;
size_t off = 0;
HRESULT hr;
+ is_out = param_flags & PARAMFLAG_FOUT;
+ is_in = (param_flags & PARAMFLAG_FIN) || (!is_out && !is_return);
+
hr = get_param_info(typeinfo, tdesc, is_in, is_out, &server_size, &flags,
&basetype, &tfs_tdesc);