From 8043f53d7d15544e587760c51e07ffe95752c49f Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 27 Jan 2024 13:32:01 +0100 Subject: Track protection even if 0 --- src/wrapped/wrappedlibc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 919b781f..c67db340 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -2766,13 +2766,7 @@ EXPORT int my_mprotect(x64emu_t* emu, void *addr, unsigned long len, int prot) } #endif if(!ret && len) { - if(prot) - updateProtection((uintptr_t)addr, len, prot); - else { - // avoid allocating detailled protection for a no prot 0 - freeProtection((uintptr_t)addr, len); - setProtection_mmap((uintptr_t)addr, len, prot); - } + updateProtection((uintptr_t)addr, len, prot); } return ret; } -- cgit 1.4.1