about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorFlorent Monjalet <florent.monjalet@gmail.com>2015-06-21 14:21:09 +0200
committerFlorent Monjalet <florent.monjalet@gmail.com>2015-06-21 23:28:38 +0200
commitb833f9a1321fb4b5f0e69cecdedf7694f9682da8 (patch)
treebc8ed5d7d7375d70a86c70aa86e0d718c9491410
parent95f6c924cbe662dff92a2644f247889d3f2e1f8f (diff)
downloadmiasm-b833f9a1321fb4b5f0e69cecdedf7694f9682da8.tar.gz
miasm-b833f9a1321fb4b5f0e69cecdedf7694f9682da8.zip
asmbloc: better error handling when an unknown label offset is set
-rw-r--r--miasm2/core/asmbloc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py
index a5dd8142..1a2d7a91 100644
--- a/miasm2/core/asmbloc.py
+++ b/miasm2/core/asmbloc.py
@@ -292,6 +292,8 @@ class asm_symbol_pool:
         Note that there is a special case when the offset is a list
         it happens when offsets are recomputed in resolve_symbol*
         """
+        if label is None:
+            raise ValueError('label should not be None')
         if not label.name in self._name2label:
             raise ValueError('label %s not in symbol pool' % label)
         if offset is not None and offset in self._offset2label: