Skip to content

Commit

Permalink
Track protection even if 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jan 27, 2024
1 parent 124672b commit 8043f53
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/wrapped/wrappedlibc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8043f53

Please sign in to comment.