mfplat: Align buffers at no less than 16 bytes boundaries.

This is what seems to be happening on Windows 10. On the other hand, I
am not seeing on native the current behavior of interpreting a zero
alignment parameter as a request to align to 64 bytes boundaries.

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Giovanni Mascellani 2022-03-15 14:29:21 +01:00 committed by Alexandre Julliard
parent 44c9ea5043
commit 20c4896b12
1 changed files with 2 additions and 1 deletions

View File

@ -1264,7 +1264,8 @@ static HRESULT memory_buffer_init(struct buffer *buffer, DWORD max_length, DWORD
{
size_t size;
if (!alignment) alignment = MF_64_BYTE_ALIGNMENT;
if (alignment < MF_16_BYTE_ALIGNMENT)
alignment = MF_16_BYTE_ALIGNMENT;
alignment++;
if (alignment & (alignment - 1))