about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-01-27 13:32:01 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-01-27 13:32:01 +0100
commit8043f53d7d15544e587760c51e07ffe95752c49f (patch)
tree47de60015b6c7c7b962565d413466111f933bfe7 /src
parent124672b8116e815e64f8f45aa76196d37d52f55e (diff)
downloadbox64-8043f53d7d15544e587760c51e07ffe95752c49f.tar.gz
box64-8043f53d7d15544e587760c51e07ffe95752c49f.zip
Track protection even if 0
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/wrappedlibc.c8
1 files changed, 1 insertions, 7 deletions
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;
 }