about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm/os_dep/win_api_x86_32_seh.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/miasm/os_dep/win_api_x86_32_seh.py b/miasm/os_dep/win_api_x86_32_seh.py
index 374a975e..1d0d875c 100644
--- a/miasm/os_dep/win_api_x86_32_seh.py
+++ b/miasm/os_dep/win_api_x86_32_seh.py
@@ -130,16 +130,16 @@ def build_peb(jitter, peb_address):
     """
 
     if main_pe:
-        offset, length = peb_address + 8, 4
+        offset, length = 8, 4
     else:
-        offset, length = peb_address + 0xC, 0
+        offset, length = 0xC, 0
     length += 4
 
     jitter.vm.add_memory_page(
-        offset,
+        peb_address + offset,
         PAGE_READ | PAGE_WRITE,
         b"\x00" * length,
-        "PEB"
+        "PEB + 0x%x" % offset
     )
 
     Peb = PEB(jitter.vm, peb_address)