about summary refs log tree commit diff stats
path: root/miasm2/analysis/data_flow.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/analysis/data_flow.py')
-rw-r--r--miasm2/analysis/data_flow.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/miasm2/analysis/data_flow.py b/miasm2/analysis/data_flow.py
index dc72d06a..5a0ffd4c 100644
--- a/miasm2/analysis/data_flow.py
+++ b/miasm2/analysis/data_flow.py
@@ -900,10 +900,9 @@ class PropagateThroughExprMem(object):
                 for dst, src in out.iteritems():
                     if dst.is_mem():
                         write_mem = True
-                    if dst != mem_dst and mem_dst in dst:
-                        dst = dst.replace_expr({mem_dst:mem_src})
-                    if mem_dst in src:
-                        src = src.replace_expr({mem_dst:mem_src})
+                        ptr = dst.ptr.replace_expr({mem_dst:mem_src})
+                        dst = ExprMem(ptr, dst.size)
+                    src = src.replace_expr({mem_dst:mem_src})
                     out_new[dst] = src
                 if out != out_new:
                     assignblk_modified = True