diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-05-02 13:44:17 +0200 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2020-05-02 13:44:17 +0200 |
| commit | 0fd664b21411c502aec783d84c9dfae5ada3c02c (patch) | |
| tree | eb274b349c21bfc6aaae56e666cce85a62c1b152 | |
| parent | cf41ca9d2c883a2f1d871415fae1b7ea81135acd (diff) | |
| download | miasm-0fd664b21411c502aec783d84c9dfae5ada3c02c.tar.gz miasm-0fd664b21411c502aec783d84c9dfae5ada3c02c.zip | |
Fix virtual protect pages
| -rw-r--r-- | miasm/os_dep/win_api_x86_32.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/miasm/os_dep/win_api_x86_32.py b/miasm/os_dep/win_api_x86_32.py index ee6db32f..e42f8006 100644 --- a/miasm/os_dep/win_api_x86_32.py +++ b/miasm/os_dep/win_api_x86_32.py @@ -764,8 +764,8 @@ def kernel32_VirtualProtect(jitter): psize = paddr_max_round - paddr for addr, items in list(winobjs.allocated_pages.items()): alloc_addr, alloc_size = items - if not (alloc_addr <= paddr and - paddr + psize <= alloc_addr + alloc_size): + if (paddr + psize <= alloc_addr or + paddr > alloc_addr + alloc_size): continue size = jitter.vm.get_all_memory()[addr]["size"] # Page is included in Protect area |