ntdll: Use the correct size when the read spans a page boundary.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cda4fa293e
commit
a98dd5a63e
|
@ -2628,7 +2628,7 @@ SIZE_T virtual_uninterrupted_read_memory( const void *addr, void *buffer, SIZE_T
|
|||
|
||||
while (bytes_read < size && (VIRTUAL_GetUnixProt( get_page_vprot( page )) & PROT_READ))
|
||||
{
|
||||
SIZE_T block_size = min( size, page_size - ((UINT_PTR)addr & page_mask) );
|
||||
SIZE_T block_size = min( size - bytes_read, page_size - ((UINT_PTR)addr & page_mask) );
|
||||
memcpy( buffer, addr, block_size );
|
||||
|
||||
addr = (const void *)((const char *)addr + block_size);
|
||||
|
|
Loading…
Reference in New Issue