diff options
| author | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-25 21:05:39 +0100 |
|---|---|---|
| committer | Fabrice Desclaux <fabrice.desclaux@cea.fr> | 2019-11-25 21:43:06 +0100 |
| commit | 1719d332bcc550e926da3f6b86150dc99640d44c (patch) | |
| tree | 324256f1fca076a4e3f033a625f6f7b89fcb13cd | |
| parent | cdeed6969c2d10dc11346a598e7d3cba0930757b (diff) | |
| download | miasm-1719d332bcc550e926da3f6b86150dc99640d44c.tar.gz miasm-1719d332bcc550e926da3f6b86150dc99640d44c.zip | |
Loader/Pe: fix py2/py3 str
| -rw-r--r-- | miasm/jitter/loader/pe.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/miasm/jitter/loader/pe.py b/miasm/jitter/loader/pe.py index 09319664..9bd48877 100644 --- a/miasm/jitter/loader/pe.py +++ b/miasm/jitter/loader/pe.py @@ -30,12 +30,8 @@ def get_pe_dependencies(pe_obj): out = set() for dependency in pe_obj.DirImport.impdesc: libname = dependency.dlldescname.name.lower() - # transform bytes to chr - if isinstance(libname, bytes): - libname_str = '' - for c in libname: - libname_str += chr(c) - libname = libname_str + # transform bytes to str + libname = force_str(libname) out.add(libname) # If binary has redirected export, add dependencies |