about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-01 15:40:29 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2020-06-01 16:22:50 +0200
commit1ad1ad398eed664c706bf109416ea1bbf111e835 (patch)
tree9591a994de90c9df429e5f55f93896a52dc3f2eb
parent21fb3f503a6fb6c31e9eee24f5bd5374e8cf003a (diff)
downloadmiasm-1ad1ad398eed664c706bf109416ea1bbf111e835.tar.gz
miasm-1ad1ad398eed664c706bf109416ea1bbf111e835.zip
Fix x86 asm offset
-rw-r--r--miasm/arch/x86/arch.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/miasm/arch/x86/arch.py b/miasm/arch/x86/arch.py
index d1802045..8263aca6 100644
--- a/miasm/arch/x86/arch.py
+++ b/miasm/arch/x86/arch.py
@@ -481,7 +481,7 @@ class instruction_x86(instruction):
         expr = self.args[0]
         if not expr.is_int():
             return
-        addr = expr.arg + int(self.offset)
+        addr = (int(expr) + int(self.offset)) & int(expr.mask)
         loc_key = loc_db.get_or_create_offset_location(addr)
         self.args[0] = ExprLoc(loc_key, expr.size)