about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2019-11-25 20:42:46 +0100
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2019-11-25 20:42:46 +0100
commitc16e8546521a469e4b7b036276f83f2ab339d0da (patch)
tree332ed4d8770b2304c8b35a4bb7052871c623646c
parent30916ae176b52ccf9aa894ebe65e822deb115743 (diff)
downloadfocaccia-miasm-c16e8546521a469e4b7b036276f83f2ab339d0da.tar.gz
focaccia-miasm-c16e8546521a469e4b7b036276f83f2ab339d0da.zip
Fix peb page comment
-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)