about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorVladislav HrĨka <nofiv@users.noreply.github.com>2020-07-07 22:39:48 +0200
committerESET GitHub admin <github@eset.com>2020-07-08 11:19:22 -0400
commitd9ffe10a32c6a28da5f15f267ed773a48e9e485c (patch)
tree0d2654e09fbbdfdae3fca378328c923025904ead
parent67d5d6686e1f1ea2a3f810e42d2d03c3fe91125d (diff)
downloadmiasm-d9ffe10a32c6a28da5f15f267ed773a48e9e485c.tar.gz
miasm-d9ffe10a32c6a28da5f15f267ed773a48e9e485c.zip
Bug fix - tuples need to be converted to str before using force_bytes
to prevent TypeError during the subsequent byte object formatting
-rw-r--r--miasm/analysis/dse.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/miasm/analysis/dse.py b/miasm/analysis/dse.py
index 9cc342c7..f3af9d18 100644
--- a/miasm/analysis/dse.py
+++ b/miasm/analysis/dse.py
@@ -258,11 +258,12 @@ class DSEEngine(object):
 
         # lambda cannot contain statement
         def default_func(dse):
-            fname = b"%s_symb" % force_bytes(libimp.fad2cname[dse.jitter.pc])
+            fname = libimp.fad2cname[dse.jitter.pc]
+            fname = b"%s_symb" % force_bytes(str(fname))
             raise RuntimeError("Symbolic stub '%s' not found" % fname)
 
         for addr, fname in viewitems(libimp.fad2cname):
-            fname = force_bytes(fname)
+            fname = force_bytes(str(fname))
             fname = b"%s_symb" % fname
             func = namespace.get(fname, None)
             if func is not None: