Skip to content

Commit

Permalink
Fixed a nasty bug on memory permission tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
ptitSeb committed Jul 11, 2024
1 parent fcbebfa commit 666b5a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/custommem.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ void updateProtection(uintptr_t addr, uintptr_t size, uint32_t prot)
uintptr_t bend;
uint32_t oprot;
rb_get_end(memprot, cur, &oprot, &bend);
if(bend>end) bend = end;
uint32_t dyn=(oprot&PROT_DYN);
if(!(dyn&PROT_NEVERPROT)) {
if(dyn && (prot&PROT_WRITE)) { // need to remove the write protection from this block
Expand Down

0 comments on commit 666b5a6

Please sign in to comment.