diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 13:32:01 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-01-27 13:32:01 +0100 |
| commit | 8043f53d7d15544e587760c51e07ffe95752c49f (patch) | |
| tree | 47de60015b6c7c7b962565d413466111f933bfe7 /src/wrapped | |
| parent | 124672b8116e815e64f8f45aa76196d37d52f55e (diff) | |
| download | box64-8043f53d7d15544e587760c51e07ffe95752c49f.tar.gz box64-8043f53d7d15544e587760c51e07ffe95752c49f.zip | |
Track protection even if 0
Diffstat (limited to 'src/wrapped')
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 8 |
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; } |