diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-07-11 12:16:31 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-07-11 12:16:31 +0200 |
| commit | 495262f90256bc341d67ec4e67879bcc31b1e174 (patch) | |
| tree | 9417d6851ab09bff7442d51e041280adc36c0e34 /src/custommem.c | |
| parent | d10a0784737a0f8c68dae736028a64924733c2d5 (diff) | |
| download | box64-495262f90256bc341d67ec4e67879bcc31b1e174.tar.gz box64-495262f90256bc341d67ec4e67879bcc31b1e174.zip | |
Fixed a nasty bug on memory permission tracking
Diffstat (limited to 'src/custommem.c')
| -rw-r--r-- | src/custommem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/custommem.c b/src/custommem.c index c8f8db66..d96a38be 100644 --- a/src/custommem.c +++ b/src/custommem.c @@ -1224,6 +1224,7 @@ void updateProtection(uintptr_t addr, size_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 |