Clear padding in the buffer due to alignment.

Robert Shearman rob at codeweavers.com
Sun Dec 16 06:07:52 CST 2007


Dmitry Timoshkov wrote:
> "Robert Shearman" <rob at codeweavers.com> wrote:
>
>> This isn't done in MIDL, but I think it's desirable both for 
>> silencing Valgrind warnings and for security purposes (fixes 
>> potential for leaking information to remote computers or other 
>> processes).
>
>> +    print_file(file, indent, "memset(_StubMsg.Buffer, 0, 
>> ((long)_StubMsg.Buffer) & 0x%x);\n", alignment - 1);
>
> Is it possible to make it 64-bit and Wine/Windows compatible by using
> ULONG_PTR instead of long?

At the moment, widl doesn't support generating 64-bit compatible client, 
server and proxy code so doing so would be useless. FWIW, MIDL outputs 
__int64 here instead of long when targeting 64-bit.

Getting support for the Microsoft 64-bit calling convention into 
upstream gcc is the most important requirement for a 64-bit Wine.

-- 
Rob Shearman




More information about the wine-devel mailing list