summaryrefslogtreecommitdiff
path: root/python/architecture.py
diff options
context:
space:
mode:
authorKyleMiles <krm504@nyu.edu>2019-07-10 12:00:23 -0400
committerKyleMiles <krm504@nyu.edu>2019-07-10 12:00:23 -0400
commit4eeb06254341ec29ec68c77be36ea62dafd2e0fb (patch)
tree242aa71a42c609a4a2f7422bec5ae3f883aaccb9 /python/architecture.py
parentad37832dd4ffa112b10b523a151d3fa9b86b6c9d (diff)
Remove extraneous str cast for instruction patching
Diffstat (limited to 'python/architecture.py')
-rw-r--r--python/architecture.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/python/architecture.py b/python/architecture.py
index 79ba6185..b5f3ac6f 100644
--- a/python/architecture.py
+++ b/python/architecture.py
@@ -1131,7 +1131,6 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
result = self.convert_to_nop(buf.raw, addr)
if result is None:
return False
- result = str(result)
if len(result) > length:
result = result[0:length]
ctypes.memmove(data, result, len(result))
@@ -1147,7 +1146,6 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
result = self.always_branch(buf.raw, addr)
if result is None:
return False
- result = str(result)
if len(result) > length:
result = result[0:length]
ctypes.memmove(data, result, len(result))
@@ -1163,7 +1161,6 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
result = self.invert_branch(buf.raw, addr)
if result is None:
return False
- result = str(result)
if len(result) > length:
result = result[0:length]
ctypes.memmove(data, result, len(result))
@@ -1179,7 +1176,6 @@ class Architecture(with_metaclass(_ArchitectureMetaClass, object)):
result = self.skip_and_return_value(buf.raw, addr, value)
if result is None:
return False
- result = str(result)
if len(result) > length:
result = result[0:length]
ctypes.memmove(data, result, len(result))