ntoskrnl.exe: Implement MmIsAddressValid (bug 11082)
Dmitry Timoshkov
dmitry at codeweavers.com
Mon Mar 17 20:09:37 CDT 2008
"Detlef Riekenberg" <wine.dev at web.de> wrote:
> + len = VirtualQuery(VirtualAddress, &info, sizeof(MEMORY_BASIC_INFORMATION));
> +
> + if ((len == sizeof(MEMORY_BASIC_INFORMATION)) &&
> + (info.Protect & (PAGE_READWRITE || PAGE_EXECUTE_READWRITE)) &&
> + ((info.Protect & PAGE_NOACCESS) == 0) &&
> + (info.Type & MEM_COMMIT))
> + {
> + return TRUE;
> + }
Besides the already pointed out '||' vs. '|' mismatch your code doesn't
handle PAGE_READONLY and others implying read-only access. Probably checking
for PAGE_NOACCESS and MEM_COMMIT should be enough.
--
Dmitry.
More information about the wine-devel
mailing list