Nikolay Sivov (@nsivov) commented about dlls/combase/usrmarshal.c:
ULONG context;
ULONG size;
WCHAR data[];
- } buf;
+};
+/******************************************************************************
HSTRING_UserSize (combase.@)
- */
+ULONG __RPC_USER HSTRING_UserSize(ULONG *flags, ULONG size, HSTRING *str) +{
- TRACE("%s, %lu, %s.\n", debugstr_user_flags(flags), size, debugstr_hstring(*str));
- ALIGN_LENGTH(size, 7);
- if (LOWORD(*flags) == MSHCTX_INPROC)
size += sizeof(union hstring_wire);
If we are going to use a union like that, this size should be hstring_wire.hstring explicitly.