summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-11-08 09:58:36 -0500
committerPeter LaFosse <peter@vector35.com>2018-11-13 11:07:27 -0500
commitd8ff0a6324fe92ccafe296298409c50cc4b526fa (patch)
treec5bf8cdf43902d3122a6747d5c42d9197afc0808 /python/architecture.py
parent9df7c7c621c82e6caa7a09c4273e4feba86277f2 (diff)
Add expression parsing APIs
Add text-based and constant-based searching
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/architecture.py b/python/architecture.py
index 5f280a98..7bef1b67 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -2426,6 +2426,8 @@ class CoreArchitecture(Architecture):
result = databuffer.DataBuffer()
errors = ctypes.c_char_p()
if not core.BNAssemble(self.handle, code, addr, result.handle, errors):
+ error_str = errors.value
+ core.BNFreeString(ctypes.cast(errors, ctypes.POINTER(ctypes.c_byte)))
raise ValueError("Could not assemble: %s" % errors.value)
if isinstance(str(result), bytes):
return str(result)