Alexandre Julliard (@julliard) commented about dlls/wow64/syscall.c:
+ if (recv_msg_attr32) + { + recv_msg_attr = RtlAllocateHeap( GetProcessHeap(), 0, AlpcGetHeaderSize( recv_msg_attr32->AllocatedAttributes ) ); + if (!recv_msg_attr) + { + RtlFreeHeap( GetProcessHeap(), 0, send_msg_attr ); + RtlFreeHeap( GetProcessHeap(), 0, msg ); + return STATUS_NO_MEMORY; + } + } + + status = NtAlpcConnectPort( &handle, unicode_str_32to64( &str, str32 ), objattr_32to64( &attr, attr32 ), + alpc_port_attributes_32to64( &port_attr, port_attr32 ), flags, sid, + alpc_port_message_32to64( msg, msg32 ), &size, + alpc_port_message_attributes_32to64( send_msg_attr, &send_qos, send_msg_attr32, TRUE ), + alpc_port_message_attributes_32to64( recv_msg_attr, &recv_qos, recv_msg_attr32, FALSE ), timeout); Variable-size structures should be allocated with WoW64AllocateTemp, and that can be done directly in the conversion functions.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10932#note_140437