Sebastian Lackner : ntdll: Avoid crash when trying to access page prot of address beyond address space limit.
Module: wine Branch: master Commit: 959d240cbe5f13612ee7fb6fc0aaaef87c436118 URL: http://source.winehq.org/git/wine.git/?a=commit;h=959d240cbe5f13612ee7fb6fc0... Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Thu Nov 16 14:14:01 2017 +0100 ntdll: Avoid crash when trying to access page prot of address beyond address space limit. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/virtual.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c index d28b138..21ccdaa 100644 --- a/dlls/ntdll/virtual.c +++ b/dlls/ntdll/virtual.c @@ -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
participants (1)
-
Alexandre Julliard