about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-08-07 22:47:18 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-08-07 22:47:18 +0200
commit91d5c147385dbb3bc8999bae3251ddc90c66f2e0 (patch)
tree15c29dbf22e734183e1a661bb4249304c6f727fa
parente38b5dd91d10ad66d537675e4592f68eda9fcce2 (diff)
downloadmiasm-91d5c147385dbb3bc8999bae3251ddc90c66f2e0.tar.gz
miasm-91d5c147385dbb3bc8999bae3251ddc90c66f2e0.zip
Func_read can be called with a non ExprInt expr
-rw-r--r--miasm2/jitter/emulatedsymbexec.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/miasm2/jitter/emulatedsymbexec.py b/miasm2/jitter/emulatedsymbexec.py
index 42f96aa2..358e0897 100644
--- a/miasm2/jitter/emulatedsymbexec.py
+++ b/miasm2/jitter/emulatedsymbexec.py
@@ -41,7 +41,10 @@ class EmulatedSymbExec(SymbolicExecutionEngine):
         """Memory read wrapper for symbolic execution
         @expr_mem: ExprMem"""
 
-        addr = expr_mem.arg.arg.arg
+        addr = expr_mem.arg
+        if not addr.is_int():
+            return expr_mem
+        addr = int(addr)
         size = expr_mem.size / 8
         value = self.cpu.get_mem(addr, size)
         if self.vm.is_little_endian():