Skip to content

Commit

Permalink
Merge pull request #68 from 0xarash/fix-read_unicode-str
Browse files Browse the repository at this point in the history
libvmi: fix read_unicode_str_va cffi usage
  • Loading branch information
Wenzel authored Jan 13, 2021
2 parents 52f40b8 + 8449067 commit 818e083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvmi/libvmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ def read_unicode_str_va(self, vaddr, pid):
if value == ffi.NULL:
raise LibvmiError('VMI_FAILURE')
encoding = ffi.string(value.encoding).decode()
buffer = ffi.string(value.contents, value.length)
buffer = bytes(ffi.unpack(value.contents, value.length))
self.free_unicode_str(value)
return buffer.decode(encoding)

Expand Down

0 comments on commit 818e083

Please sign in to comment.