about summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--miasm2/ir/ir.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py
index e5f0c8db..1d720e1f 100644
--- a/miasm2/ir/ir.py
+++ b/miasm2/ir/ir.py
@@ -124,6 +124,10 @@ class AssignBlock(object):
             args = [expr for (expr, _, _) in args]
             new_src = m2_expr.ExprCompose(*args)
 
+        # Sanity check
+        if not isinstance(new_dst, (m2_expr.ExprId, m2_expr.ExprMem)):
+            raise TypeError("Destination cannot be a %s" % type(new_dst))
+
         self._assigns[new_dst] = new_src
 
     def __setitem__(self, dst, src):