ntdll: Avoid crash when trying to access page prot of address beyond address space limit.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2017-11-16 14:14:01 +01:00 committed by Alexandre Julliard
parent c08e5560c4
commit 959d240cbe
1 changed files with 1 additions and 0 deletions

View File

@ -185,6 +185,7 @@ static BYTE get_page_vprot( const void *addr )
size_t idx = (size_t)addr >> page_shift;
#ifdef _WIN64
if ((idx >> pages_vprot_shift) >= pages_vprot_size) return 0;
if (!pages_vprot[idx >> pages_vprot_shift]) return 0;
return pages_vprot[idx >> pages_vprot_shift][idx & pages_vprot_mask];
#else