evil: fix access to a file mapping object

Patch from Jorge Luis Zapatta (turran), a bit modified
by me

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Vincent Torri 2015-03-20 08:16:20 +01:00 committed by Cedric BAIL
parent 3f7bf36046
commit 50f06dbdb1
1 changed files with 1 additions and 1 deletions

View File

@ -103,7 +103,7 @@ mmap(void *addr EVIL_UNUSED,
if (protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ))
acs = FILE_MAP_EXECUTE;
#endif
else if ((protect & (PAGE_READWRITE | PAGE_READONLY)) == (PAGE_READWRITE | PAGE_READONLY))
else if (protect & (PAGE_READWRITE | PAGE_READONLY))
acs = FILE_MAP_READ;
else
{