diff options
| author | serpilliere <serpilliere@users.noreply.github.com> | 2020-05-02 17:27:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-02 17:27:26 +0200 |
| commit | 1f01f8f5369c74100e237c90f1262924e3478826 (patch) | |
| tree | e418bfa6aa3b1b012ec4ad40ee537bec6de6a398 | |
| parent | c118fcb212e89348cacfe5e74ff971dece769ce8 (diff) | |
| parent | 0fd664b21411c502aec783d84c9dfae5ada3c02c (diff) | |
| download | miasm-1f01f8f5369c74100e237c90f1262924e3478826.tar.gz miasm-1f01f8f5369c74100e237c90f1262924e3478826.zip | |
Merge pull request #1216 from serpilliere/fix_virtualprotect
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 |